Deleted Added
full compact
thr_cond.c (18415) thr_cond.c (22315)
1/*
2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 258 unchanged lines hidden (view full) ---

267
268 /* Process according to condition variable type: */
269 switch ((*cond)->c_type) {
270 /* Fast condition variable: */
271 case COND_TYPE_FAST:
272 /* Bring the next thread off the condition queue: */
273 if ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
274 /* Allow the thread to run: */
1/*
2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 258 unchanged lines hidden (view full) ---

267
268 /* Process according to condition variable type: */
269 switch ((*cond)->c_type) {
270 /* Fast condition variable: */
271 case COND_TYPE_FAST:
272 /* Bring the next thread off the condition queue: */
273 if ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
274 /* Allow the thread to run: */
275 pthread->state = PS_RUNNING;
275 PTHREAD_NEW_STATE(pthread,PS_RUNNING);
276 }
277 break;
278
279 /* Trap invalid condition variable types: */
280 default:
281 /* Return an invalid argument error: */
282 errno = EINVAL;
283 rval = -1;

--- 20 unchanged lines hidden (view full) ---

304
305 /* Process according to condition variable type: */
306 switch ((*cond)->c_type) {
307 /* Fast condition variable: */
308 case COND_TYPE_FAST:
309 /* Enter a loop to bring all threads off the condition queue: */
310 while ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
311 /* Allow the thread to run: */
276 }
277 break;
278
279 /* Trap invalid condition variable types: */
280 default:
281 /* Return an invalid argument error: */
282 errno = EINVAL;
283 rval = -1;

--- 20 unchanged lines hidden (view full) ---

304
305 /* Process according to condition variable type: */
306 switch ((*cond)->c_type) {
307 /* Fast condition variable: */
308 case COND_TYPE_FAST:
309 /* Enter a loop to bring all threads off the condition queue: */
310 while ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
311 /* Allow the thread to run: */
312 pthread->state = PS_RUNNING;
312 PTHREAD_NEW_STATE(pthread,PS_RUNNING);
313 }
314 break;
315
316 /* Trap invalid condition variable types: */
317 default:
318 /* Return an invalid argument error: */
319 errno = EINVAL;
320 rval = -1;
321 break;
322 }
323
324 /* Unblock signals: */
325 _thread_kern_sig_unblock(status);
326
327 /* Return the completion status: */
328 return (rval);
329}
330#endif
313 }
314 break;
315
316 /* Trap invalid condition variable types: */
317 default:
318 /* Return an invalid argument error: */
319 errno = EINVAL;
320 rval = -1;
321 break;
322 }
323
324 /* Unblock signals: */
325 _thread_kern_sig_unblock(status);
326
327 /* Return the completion status: */
328 return (rval);
329}
330#endif