1 |
/* IPC thread queues. |
/* IPC thread queues. |
2 |
Copyright 1999, 2000, 2001 Johan Rydberg, jrydberg@opencores.org. |
Copyright 1999, 2000, 2001, 2002 Johan Rydberg, jrydberg@rtmk.org. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
19 |
#include "thread.h" |
#include "thread.h" |
20 |
|
|
21 |
/* Initialize thread queue ITQ. */ |
/* Initialize thread queue ITQ. */ |
|
|
|
22 |
void |
void |
23 |
ipc_tqueue_init (struct ipc_tqueue *itq) |
ipc_tqueue_init (struct ipc_tqueue *itq) |
24 |
{ |
{ |
26 |
} |
} |
27 |
|
|
28 |
/* Enqueue thread TH on thread queue ITQ. TH should be unlocked. */ |
/* Enqueue thread TH on thread queue ITQ. TH should be unlocked. */ |
|
|
|
29 |
void |
void |
30 |
ipc_tqueue_enqueue (struct ipc_tqueue *itq, struct thread *th) |
ipc_tqueue_enqueue (struct ipc_tqueue *itq, struct thread *th) |
31 |
{ |
{ |
38 |
SPLON (spl); |
SPLON (spl); |
39 |
} |
} |
40 |
|
|
41 |
/* Dequeue thread from thread queue ITQ. Returning it. */ |
/* Remove THREAD for thread queue ITQ. THREAD must be locked. */ |
42 |
|
void |
43 |
|
ipc_tqueue_remove (struct ipc_tqueue *itq, struct thread *thread) |
44 |
|
{ |
45 |
|
queue_remove (&itq->queue, thread, struct thread *, ipcq); |
46 |
|
} |
47 |
|
|
48 |
|
/* Dequeue thread from thread queue ITQ. Returning it. */ |
49 |
struct thread * |
struct thread * |
50 |
ipc_tqueue_dequeue (struct ipc_tqueue *itq) |
ipc_tqueue_dequeue (struct ipc_tqueue *itq) |
51 |
{ |
{ |