OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [include/] [rtems/] [rtems/] [semmp.h] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  semmp.h
2
 *
3
 *  This include file contains all the constants and structures associated
4
 *  with the Multiprocessing Support in the Semaphore Manager.
5
 *
6
 *  COPYRIGHT (c) 1989-1999.
7
 *  On-Line Applications Research Corporation (OAR).
8
 *
9
 *  The license and distribution terms for this file may be
10
 *  found in the file LICENSE in this distribution or at
11
 *  http://www.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: semmp.h,v 1.2 2001-09-27 11:59:18 chris Exp $
14
 */
15
 
16
#ifndef __RTEMS_SEMAPHORE_MP_h
17
#define __RTEMS_SEMAPHORE_MP_h
18
 
19
#ifdef __cplusplus
20
extern "C" {
21
#endif
22
 
23
#include <rtems/score/mppkt.h>
24
#include <rtems/score/object.h>
25
#include <rtems/rtems/options.h>
26
#include <rtems/rtems/sem.h>
27
#include <rtems/score/thread.h>
28
#include <rtems/score/watchdog.h>
29
 
30
/*
31
 *  The following enumerated type defines the list of
32
 *  remote semaphore operations.
33
 */
34
 
35
typedef enum {
36
  SEMAPHORE_MP_ANNOUNCE_CREATE  =  0,
37
  SEMAPHORE_MP_ANNOUNCE_DELETE  =  1,
38
  SEMAPHORE_MP_EXTRACT_PROXY    =  2,
39
  SEMAPHORE_MP_OBTAIN_REQUEST   =  3,
40
  SEMAPHORE_MP_OBTAIN_RESPONSE  =  4,
41
  SEMAPHORE_MP_RELEASE_REQUEST  =  5,
42
  SEMAPHORE_MP_RELEASE_RESPONSE =  6
43
}   Semaphore_MP_Remote_operations;
44
 
45
/*
46
 *  The following data structure defines the packet used to perform
47
 *  remote semaphore operations.
48
 */
49
 
50
typedef struct {
51
  rtems_packet_prefix             Prefix;
52
  Semaphore_MP_Remote_operations  operation;
53
  rtems_name                      name;
54
  rtems_option                    option_set;
55
  Objects_Id                      proxy_id;
56
}   Semaphore_MP_Packet;
57
 
58
/*
59
 *  _Semaphore_MP_Send_process_packet
60
 *
61
 *  DESCRIPTION:
62
 *
63
 *  This routine performs a remote procedure call so that a
64
 *  process operation can be performed on another node.
65
 */
66
 
67
void _Semaphore_MP_Send_process_packet (
68
  Semaphore_MP_Remote_operations operation,
69
  Objects_Id                     semaphore_id,
70
  rtems_name                     name,
71
  Objects_Id                     proxy_id
72
);
73
 
74
/*
75
 *  _Semaphore_MP_Send_request_packet
76
 *
77
 *  DESCRIPTION:
78
 *
79
 *  This routine performs a remote procedure call so that a
80
 *  directive operation can be initiated on another node.
81
 */
82
 
83
rtems_status_code _Semaphore_MP_Send_request_packet (
84
  Semaphore_MP_Remote_operations operation,
85
  Objects_Id                     semaphore_id,
86
  rtems_option                   option_set,
87
  rtems_interval                 timeout
88
);
89
 
90
/*
91
 *  _Semaphore_MP_Send_response_packet
92
 *
93
 *  DESCRIPTION:
94
 *
95
 *  This routine performs a remote procedure call so that a
96
 *  directive can be performed on another node.
97
 */
98
 
99
void _Semaphore_MP_Send_response_packet (
100
  Semaphore_MP_Remote_operations  operation,
101
  Objects_Id                      semaphore_id,
102
  Thread_Control                 *the_thread
103
);
104
 
105
/*
106
 *
107
 *  _Semaphore_MP_Process_packet
108
 *
109
 *  DESCRIPTION:
110
 *
111
 *  This routine performs the actions specific to this package for
112
 *  the request from another node.
113
 */
114
 
115
void _Semaphore_MP_Process_packet (
116
  rtems_packet_prefix *the_packet_prefix
117
);
118
 
119
/*
120
 *  _Semaphore_MP_Send_object_was_deleted
121
 *
122
 *  DESCRIPTION:
123
 *
124
 *  This routine is invoked indirectly by the thread queue
125
 *  when a proxy has been removed from the thread queue and
126
 *  the remote node must be informed of this.
127
 */
128
 
129
void _Semaphore_MP_Send_object_was_deleted (
130
  Thread_Control *the_proxy
131
);
132
 
133
/*
134
 *  _Semaphore_MP_Send_extract_proxy
135
 *
136
 *  DESCRIPTION:
137
 *
138
 *  This routine is invoked when a task is deleted and it
139
 *  has a proxy which must be removed from a thread queue and
140
 *  the remote node must be informed of this.
141
 */
142
 
143
void _Semaphore_MP_Send_extract_proxy (
144
  Thread_Control *the_thread
145
);
146
 
147
/*
148
 *  _Semaphore_MP_Get_packet
149
 *
150
 *  DESCRIPTION:
151
 *
152
 *  This function is used to obtain a semaphore mp packet.
153
 */
154
 
155
Semaphore_MP_Packet *_Semaphore_MP_Get_packet ( void );
156
 
157
#ifdef __cplusplus
158
}
159
#endif
160
 
161
#endif
162
/* end of file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.