mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpiutil] Rename CreateEvent and CreateSemaphore to Make (#8710)
CreateEvent and CreateSemaphore are macros in Windows.h, which causes a ton of trouble. Just rename the functions. Closes #7303 Replaces #7336
This commit is contained in:
@@ -112,7 +112,7 @@ public class WPIUtilJNI {
|
||||
* @param initialState true to make the event initially in signaled state
|
||||
* @return Event handle
|
||||
*/
|
||||
public static native int createEvent(boolean manualReset, boolean initialState);
|
||||
public static native int makeEvent(boolean manualReset, boolean initialState);
|
||||
|
||||
/**
|
||||
* Destroys an event. Destruction wakes up any waiters.
|
||||
@@ -145,7 +145,7 @@ public class WPIUtilJNI {
|
||||
* @param maximumCount maximum value for the semaphore's internal counter
|
||||
* @return Semaphore handle
|
||||
*/
|
||||
public static native int createSemaphore(int initialCount, int maximumCount);
|
||||
public static native int makeSemaphore(int initialCount, int maximumCount);
|
||||
|
||||
/**
|
||||
* Destroys a semaphore. Destruction wakes up any waiters.
|
||||
|
||||
@@ -22,7 +22,7 @@ public final class Event implements AutoCloseable {
|
||||
* @param initialState true to make the event initially in signaled state
|
||||
*/
|
||||
public Event(boolean manualReset, boolean initialState) {
|
||||
m_handle = WPIUtilJNI.createEvent(manualReset, initialState);
|
||||
m_handle = WPIUtilJNI.makeEvent(manualReset, initialState);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ public final class Semaphore implements AutoCloseable {
|
||||
* @param maximumCount maximum value for the semaphore's internal counter
|
||||
*/
|
||||
public Semaphore(int initialCount, int maximumCount) {
|
||||
m_handle = WPIUtilJNI.createSemaphore(initialCount, maximumCount);
|
||||
m_handle = WPIUtilJNI.makeSemaphore(initialCount, maximumCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user