Changeset 32481 for trunk/psLib/src/sys/psThread.c
- Timestamp:
- Oct 4, 2011, 12:15:49 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psThread.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psThread.c
r28405 r32481 36 36 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; // Mutex for locking threads 37 37 38 static psList *pending = NULL;// queue of pending jobs39 static psList *done = NULL;// queue of done jobs38 static volatile psList *pending = NULL; // queue of pending jobs 39 static volatile psList *done = NULL; // queue of done jobs 40 40 static pthread_t *threads = NULL; // array of the POSIX thread handles 41 41 static psArray *pool = NULL; // array of defined threads … … 116 116 done = psListAlloc(NULL); 117 117 } 118 psListAdd( done, PS_LIST_TAIL, job);118 psListAdd((psList *)done, PS_LIST_TAIL, job); 119 119 psFree(job); 120 120 return task->function(job); … … 125 125 pending = psListAlloc(NULL); 126 126 } 127 psListAdd( pending, PS_LIST_TAIL, job);127 psListAdd((psList *)pending, PS_LIST_TAIL, job); 128 128 psFree(job); 129 129 psThreadUnlock(); … … 139 139 } 140 140 141 psThreadJob *job = psListGetAndRemove( pending, PS_LIST_HEAD);141 psThreadJob *job = psListGetAndRemove((psList *)pending, PS_LIST_HEAD); 142 142 return job; 143 143 } … … 150 150 } 151 151 152 psThreadJob *job = psListGetAndRemove( done, PS_LIST_HEAD);152 psThreadJob *job = psListGetAndRemove((psList *) done, PS_LIST_HEAD); 153 153 return job; 154 154 } … … 253 253 done = psListAlloc(NULL); 254 254 } 255 psListAdd( done, PS_LIST_TAIL, job);255 psListAdd((psList *)done, PS_LIST_TAIL, job); 256 256 psFree(job); 257 257
Note:
See TracChangeset
for help on using the changeset viewer.
