Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 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: pi.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $
25
 
26
 File:        $File$
27
 Revision:    $Revision: 1.1.1.1 $
28
 Last update: $Date: 2002-03-29 14:12:51 $
29
 ------------
30
 
31
 This file contains the Priority Inheritance (PI) Protocol
32
 
33
 Title:
34
   PI (Priority Inheritance protocol)
35
 
36
 Resource Models Accepted:
37
   None
38
 
39
 Description:
40
   This module implement the Priority Inheritance Protocol.
41
   The priority inheritance is made using the shadow field of the
42
   task descriptor. No difference is made upon the task model of the
43
   tasks that use PI mutexes.
44
 
45
   A PI mutex is created passing the PI_mutexattr structure to mutex_init.
46
 
47
 Exceptions raised:
48
   XMUTEX_OWNER_KILLED
49
     This exception is raised when a task ends and it owns one or more
50
     mutexes
51
 
52
 Restrictions & special features:
53
   - This module is NOT Posix compliant
54
   - This module can manage any number of PI mutexes.
55
   - If a task ends (because it reaches the end of the body or because it
56
     is killed by someone) and it owns some mutex, an exception is raised.
57
   - if a mutex unlock is called on a mutex not previously
58
     locked or previously locked by another task an exception is raised
59
   - A PI mutex can be statically allocated. To do this, the init function
60
     have to define a macro that puts this information in the mutex
61
     descriptor: mutexlevel = <PI resource level>; opt = NULL;
62
     for example, if the PI module is registered at level 1, the macro is
63
     like:
64
     #define MUTEX_INITIALIZER {1,NULL}
65
 
66
**/
67
 
68
/*
69
 * Copyright (C) 2000 Paolo Gai
70
 *
71
 * This program is free software; you can redistribute it and/or modify
72
 * it under the terms of the GNU General Public License as published by
73
 * the Free Software Foundation; either version 2 of the License, or
74
 * (at your option) any later version.
75
 *
76
 * This program is distributed in the hope that it will be useful,
77
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
78
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
79
 * GNU General Public License for more details.
80
 *
81
 * You should have received a copy of the GNU General Public License
82
 * along with this program; if not, write to the Free Software
83
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
84
 *
85
 */
86
 
87
 
88
 
89
#ifndef __PI_H__
90
#define __PI_H__
91
 
92
void PI_register_module(void);
93
 
94
#endif