- Timestamp:
- Jul 10, 2008, 3:29:37 AM (16 years ago)
- File:
-
- 1 edited
-
release/1.2/source/lisp-kernel/thread_manager.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
release/1.2/source/lisp-kernel/thread_manager.c
r9852 r9998 61 61 raise_thread_interrupt(TCR *target) 62 62 { 63 pthread_t thread = (pthread_t)target->osid; 63 64 #ifdef DARWIN_not_yet 64 65 if (use_mach_exception_handling) { … … 66 67 } 67 68 #endif 68 return pthread_kill((pthread_t)target->osid, SIGNAL_FOR_PROCESS_INTERRUPT); 69 if (thread != (pthread_t) 0) { 70 return pthread_kill(thread, SIGNAL_FOR_PROCESS_INTERRUPT); 71 } 72 return ESRCH; 69 73 } 70 74 #endif … … 180 184 lock_recursive_lock(RECURSIVE_LOCK m, TCR *tcr) 181 185 { 182 natural val;183 186 if (tcr == NULL) { 184 187 tcr = get_tcr(true); … … 232 235 unlock_recursive_lock(RECURSIVE_LOCK m, TCR *tcr) 233 236 { 234 int ret = EPERM , pending;237 int ret = EPERM; 235 238 236 239 if (tcr == NULL) { … … 1108 1111 { 1109 1112 thread_activation activation; 1110 TCR *current = get_tcr(false);1111 1113 1112 1114 … … 1279 1281 { 1280 1282 int suspend_count = atomic_incf(&(tcr->suspend_count)); 1283 pthread_t thread; 1281 1284 if (suspend_count == 1) { 1282 1285 #if SUSPEND_RESUME_VERBOSE … … 1289 1292 } 1290 1293 #endif 1291 if (pthread_kill((pthread_t)(tcr->osid), thread_suspend_signal) == 0) { 1294 thread = (pthread_t)(tcr->osid); 1295 if ((thread != (pthread_t) 0) && 1296 (pthread_kill(thread, thread_suspend_signal) == 0)) { 1292 1297 SET_TCR_FLAG(tcr,TCR_FLAG_BIT_SUSPEND_ACK_PENDING); 1293 1298 } else { … … 1357 1362 resume_tcr(TCR *tcr) 1358 1363 { 1359 int suspend_count = atomic_decf(&(tcr->suspend_count)) , err;1364 int suspend_count = atomic_decf(&(tcr->suspend_count)); 1360 1365 if (suspend_count == 0) { 1361 1366 #ifdef DARWIN … … 1574 1579 1575 1580 void *p = calloc(1,sizeof(rwlock)+cache_block_size-1); 1576 rwlock *rw ;1581 rwlock *rw = NULL;; 1577 1582 1578 1583 if (p) {
Note:
See TracChangeset
for help on using the changeset viewer.
