Moved C++ comments from source files to headers (#1111)

Also sorted functions in C++ sources to match order in related headers.
This commit is contained in:
Tyler Veness
2018-05-31 20:47:15 -07:00
committed by Peter Johnson
parent d9971a705a
commit 8c680a26f8
234 changed files with 9936 additions and 9309 deletions

View File

@@ -12,14 +12,8 @@
#include "ErrorBase.h"
namespace frc {
/**
* Get the thread priority for the specified thread.
*
* @param thread Reference to the thread to get the priority for.
* @param isRealTime Set to true if thread is realtime, otherwise false.
* @return The current thread priority. Scaled 1-99, with 1 being highest.
*/
using namespace frc;
int GetThreadPriority(std::thread& thread, bool* isRealTime) {
int32_t status = 0;
HAL_Bool rt = false;
@@ -30,12 +24,6 @@ int GetThreadPriority(std::thread& thread, bool* isRealTime) {
return ret;
}
/**
* Get the thread priority for the current thread
*
* @param isRealTime Set to true if thread is realtime, otherwise false.
* @return The current thread priority. Scaled 1-99.
*/
int GetCurrentThreadPriority(bool* isRealTime) {
int32_t status = 0;
HAL_Bool rt = false;
@@ -45,18 +33,6 @@ int GetCurrentThreadPriority(bool* isRealTime) {
return ret;
}
/**
* Sets the thread priority for the specified thread
*
* @param thread Reference to the thread to set the priority of.
* @param realTime Set to true to set a realtime priority, false for standard
* priority.
* @param priority Priority to set the thread to. Scaled 1-99, with 1 being
* highest. On RoboRIO, priority is ignored for non realtime
* setting.
*
* @return The success state of setting the priority
*/
bool SetThreadPriority(std::thread& thread, bool realTime, int priority) {
int32_t status = 0;
auto native = thread.native_handle();
@@ -65,21 +41,9 @@ bool SetThreadPriority(std::thread& thread, bool realTime, int priority) {
return ret;
}
/**
* Sets the thread priority for the current thread
*
* @param realTime Set to true to set a realtime priority, false for standard
* priority.
* @param priority Priority to set the thread to. Scaled 1-99, with 1 being
* highest. On RoboRIO, priority is ignored for non realtime
* setting.
*
* @return The success state of setting the priority
*/
bool SetCurrentThreadPriority(bool realTime, int priority) {
int32_t status = 0;
auto ret = HAL_SetCurrentThreadPriority(realTime, priority, &status);
wpi_setGlobalErrorWithContext(status, HAL_GetErrorMessage(status));
return ret;
}
} // namespace frc