Changeset 28484 for branches/pap/psLib/src/sys/psThread.h
- Timestamp:
- Jun 24, 2010, 2:59:09 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psLib/src/sys/psThread.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psLib/src/sys/psThread.h
r19297 r28484 41 41 bool busy; // Is the thread busy? 42 42 bool fault; // Has the thread faulted? 43 pthread_t pt; // The thread itself44 43 } psThread; 45 44 … … 74 73 75 74 /// Add a pending job to the queue 75 /// 76 /// This function swallows the provided job, so that the user no longer owns it. This is because freeing the 77 /// job is not thread-safe (its reference count is being changed within the threads) so we handle it ourselves 78 /// and absolve the user from all responsibility. If the user stores the job, he should only access it while 79 /// threads are processing in code protected by psThreadLock/psThreadUnlock. 76 80 bool psThreadJobAddPending(psThreadJob *job); 77 81 78 82 /// Get a job off the queue of pending jobs 83 /// 84 /// This function is not thread-safe. Protect with psThreadLock/psThreadUnlock if threads are running. 79 85 psThreadJob *psThreadJobGetPending(void); 80 86 81 87 /// Get a job off the queue of done jobs 88 /// 89 /// This function is not thread-safe. Protect with psThreadLock/psThreadUnlock if threads are running. 82 90 psThreadJob *psThreadJobGetDone(void); 83 91 … … 116 124 bool psThreadPoolFinalize(void); 117 125 118 126 #if 0 119 127 /// Add thread-specific data 120 128 /// … … 135 143 bool psThreadDataRemove(const char *name // Name of data 136 144 ); 137 145 #endif 138 146 139 147 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
