26 |
/* |
/* |
27 |
* HISTORY |
* HISTORY |
28 |
* $Log$ |
* $Log$ |
29 |
|
* Revision 1.17 2002/05/08 09:32:14 roland |
30 |
|
* 2002-05-07 Roland McGrath <roland@frob.com> |
31 |
|
* |
32 |
|
* * cthreads.h (cthread_sp): Cast to vm_address_t instead of int. |
33 |
|
* (mutex_unlock): Cast to void * instead of int. |
34 |
|
* |
35 |
* Revision 1.16 2001/03/31 23:01:01 roland |
* Revision 1.16 2001/03/31 23:01:01 roland |
36 |
* 2001-03-31 Roland McGrath <roland@frob.com> |
* 2001-03-31 Roland McGrath <roland@frob.com> |
37 |
* |
* |
240 |
#include <machine/cthreads.h> |
#include <machine/cthreads.h> |
241 |
#else |
#else |
242 |
#include <machine-sp.h> |
#include <machine-sp.h> |
243 |
#define cthread_sp() ((int) __thread_stack_pointer ()) |
#define cthread_sp() ((vm_address_t) __thread_stack_pointer ()) |
244 |
#endif |
#endif |
245 |
|
|
246 |
#if c_plusplus || __STDC__ |
#if c_plusplus || __STDC__ |
414 |
#define mutex_unlock(m) \ |
#define mutex_unlock(m) \ |
415 |
MACRO_BEGIN \ |
MACRO_BEGIN \ |
416 |
if (spin_unlock(&(m)->held), \ |
if (spin_unlock(&(m)->held), \ |
417 |
cthread_queue_head(&(m)->queue, int) != 0) { \ |
cthread_queue_head(&(m)->queue, void *) != 0) { \ |
418 |
__mutex_unlock_solid(m); \ |
__mutex_unlock_solid(m); \ |
419 |
} \ |
} \ |
420 |
MACRO_END |
MACRO_END |