Rev 961 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
961 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | |||
22 | /** |
||
23 | ------------ |
||
24 | CVS : $Id: nop.h,v 1.1 2005-02-25 10:53:02 pj Exp $ |
||
25 | |||
26 | File: $File$ |
||
27 | Revision: $Revision: 1.1 $ |
||
28 | Last update: $Date: 2005-02-25 10:53:02 $ |
||
29 | ------------ |
||
30 | |||
31 | This file contains the No Protocol (NOP) implementation of mutexes |
||
32 | |||
33 | Title: |
||
34 | NOP (Binary Semaphores) |
||
35 | |||
36 | Resource Models Accepted: |
||
37 | None |
||
38 | |||
39 | Description: |
||
40 | This module implement a mutex interface using extraction and insertion |
||
41 | into scheduling queues. |
||
42 | |||
43 | Exceptions raised: |
||
44 | none |
||
45 | |||
46 | Restrictions & special features: |
||
47 | - This module is NOT Posix compliant |
||
48 | - This module can manage any number of NOP mutexes. |
||
49 | - A NOP mutex can be statically allocated. To do this, the init function |
||
50 | have to define a macro that puts this information in the mutex |
||
51 | descriptor: mutexlevel = <NOP resource level>; opt = NULL; |
||
52 | for example, if the NOP module is registered at level 1, the macro is |
||
53 | like: |
||
54 | #define MUTEX_INITIALIZER {1,(void *)NULL} |
||
55 | |||
56 | **/ |
||
57 | |||
58 | /* |
||
59 | * Copyright (C) 2000 Paolo Gai |
||
60 | * |
||
61 | * This program is free software; you can redistribute it and/or modify |
||
62 | * it under the terms of the GNU General Public License as published by |
||
63 | * the Free Software Foundation; either version 2 of the License, or |
||
64 | * (at your option) any later version. |
||
65 | * |
||
66 | * This program is distributed in the hope that it will be useful, |
||
67 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
68 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
69 | * GNU General Public License for more details. |
||
70 | * |
||
71 | * You should have received a copy of the GNU General Public License |
||
72 | * along with this program; if not, write to the Free Software |
||
73 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
74 | * |
||
75 | */ |
||
76 | |||
77 | |||
78 | |||
79 | #ifndef __NOP_H__ |
||
80 | #define __NOP_H__ |
||
81 | |||
82 | #include <kernel/types.h> |
||
83 | #include "ll/sys/cdefs.h" |
||
84 | |||
85 | __BEGIN_DECLS |
||
86 | |||
87 | RLEVEL NOP_register_module(void); |
||
88 | |||
89 | __END_DECLS |
||
90 | #endif |