[hal] Add function for changing HAL Notifier thread priority (#3218)

This commit is contained in:
Tyler Veness
2021-02-28 22:05:26 -08:00
committed by GitHub
parent 40b367513f
commit 3cf44e0a53
8 changed files with 86 additions and 0 deletions

View File

@@ -36,6 +36,19 @@ Java_edu_wpi_first_hal_NotifierJNI_initializeNotifier
return (jint)notifierHandle;
}
/*
* Class: edu_wpi_first_hal_NotifierJNI
* Method: setHALThreadPriority
* Signature: (ZI)Z
*/
JNIEXPORT jboolean JNICALL
Java_edu_wpi_first_hal_NotifierJNI_setHALThreadPriority
(JNIEnv* env, jclass, jboolean realTime, jint priority)
{
int32_t status = 0;
return HAL_SetNotifierThreadPriority(realTime, priority, &status);
}
/*
* Class: edu_wpi_first_hal_NotifierJNI
* Method: setNotifierName