Main Page | Modules | Class List | File List | Class Members | File Members | Related Pages

wqueue.c

Go to the documentation of this file.
00001 /* $Id: wqueue.c,v 1.5 2004/04/27 08:15:54 aw11 Exp $ */
00002 /*****************************************************************************/
00011 /* (c) 2003 Technische Universitaet Dresden
00012  * This file is part of DROPS, which is distributed under the terms of the
00013  * GNU General Public License 2. Please see the COPYING file for details.
00014  */
00015 
00016 /* L4 */
00017 #include <l4/dde_linux/dde.h>
00018 
00019 /* Linux */
00020 #include <asm/system.h>  /* local_irq_save and friends */
00021 #include <linux/wait.h>
00022 #include <linux/sched.h>
00023 
00024 #include "fastcall.h"
00025 
00033 void FASTCALL(add_wait_queue(wait_queue_head_t * q, wait_queue_t * wait))
00034 {
00035   unsigned long flags;
00036 
00037   wq_write_lock_irqsave(&q->lock, flags);
00038   wait->flags = 0;
00039   __add_wait_queue(q, wait);
00040   wq_write_unlock_irqrestore(&q->lock, flags);
00041 }
00042 
00045 void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t * q, wait_queue_t * wait))
00046 {
00047   unsigned long flags;
00048 
00049   wq_write_lock_irqsave(&q->lock, flags);
00050   wait->flags = WQ_FLAG_EXCLUSIVE;
00051   __add_wait_queue_tail(q, wait);
00052   wq_write_unlock_irqrestore(&q->lock, flags);
00053 }
00054 
00057 void FASTCALL(remove_wait_queue(wait_queue_head_t * q, wait_queue_t * wait))
00058 {
00059   unsigned long flags;
00060 
00061   wq_write_lock_irqsave(&q->lock, flags);
00062   __remove_wait_queue(q, wait);
00063   wq_write_unlock_irqrestore(&q->lock, flags);
00064 }
00065 

Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden