/[rtmk]/rtmk/ipc-tqueue.c
ViewVC logotype

Diff of /rtmk/ipc-tqueue.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by jrydberg, Tue Jan 29 18:31:45 2002 UTC revision 1.4 by jrydberg, Wed Feb 20 20:04:42 2002 UTC
# Line 1  Line 1 
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
# Line 19  Foundation, Inc., 59 Temple Place - Suit Line 19  Foundation, Inc., 59 Temple Place - Suit
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  {  {
# Line 27  ipc_tqueue_init (struct ipc_tqueue *itq) Line 26  ipc_tqueue_init (struct ipc_tqueue *itq)
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  {  {
# Line 40  ipc_tqueue_enqueue (struct ipc_tqueue *i Line 38  ipc_tqueue_enqueue (struct ipc_tqueue *i
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  {  {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26