mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
artf4149: Removed references to VxWorks
Implemented setTaskPriority() and getTaskPriority() in Task HAL API Removed all other unimplemented functions in HAL and removed spawnTask() Replaced instances of pthread_t* with TASK typedef Removed unused HAL error constants and removed commented-out classes and functions in wpilibj's HALLibrary Changed Task class API to match the construction semantics of a std::thread Change-Id: I3bc951a3da90d24c5589fae4d1ca2bb60225c873
This commit is contained in:
committed by
James Kuszmaul
parent
5712565068
commit
fd4c169658
@@ -24,11 +24,9 @@ static const char *kValuePrefix = "=\"";
|
||||
/** The characters to put after the value */
|
||||
static const char *kValueSuffix = "\"\n";
|
||||
|
||||
Preferences::Preferences()
|
||||
: m_readTask("PreferencesReadTask", (FUNCPTR)Preferences::InitReadTask),
|
||||
m_writeTask("PreferencesWriteTask", (FUNCPTR)Preferences::InitWriteTask) {
|
||||
Preferences::Preferences() {
|
||||
std::unique_lock<priority_recursive_mutex> sync(m_fileLock);
|
||||
m_readTask.Start((uint32_t) this);
|
||||
m_readTask = Task("PreferencesReadTask", &Preferences::ReadTaskRun, this);
|
||||
|
||||
/* The main thread initially blocks on the semaphore. The read task signals
|
||||
* the main thread to continue after it has locked the table mutex (so the
|
||||
@@ -293,7 +291,7 @@ void Preferences::PutLong(const char *key, int64_t value) {
|
||||
*/
|
||||
void Preferences::Save() {
|
||||
std::unique_lock<priority_recursive_mutex> sync(m_fileLock);
|
||||
m_writeTask.Start((uint32_t) this);
|
||||
m_writeTask = Task("PreferencesWriteTask", &Preferences::WriteTaskRun, this);
|
||||
m_fileOpStarted.take();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user