1 /*********************************************************************
5 * Description: IrDA module and utilities functions
6 * Status: Experimental.
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Mon Dec 15 13:58:52 1997
9 * Modified at: Fri Jan 28 13:15:24 2000
10 * Modified by: Dag Brattli <dagb@cs.uit.no>
12 * Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
13 * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charg.
24 ********************************************************************/
29 #include <net/irda/irda.h> /* Notify stuff */
31 /* Nothing much here anymore - Maybe this header should be merged in
32 * another header like net/irda/irda.h... - Jean II */
34 /* Locking wrapper - Note the inverted logic on irda_lock().
35 * Those function basically return false if the lock is already in the
36 * position you want to set it. - Jean II */
37 #define irda_lock(lock) (! test_and_set_bit(0, (void *) (lock)))
38 #define irda_unlock(lock) (test_and_clear_bit(0, (void *) (lock)))
40 /* Zero the notify structure */
41 void irda_notify_init(notify_t *notify);