source: rtems/cpukit/posix/include/rtems/posix/pthreadmp.h @ 5ec2f12d

4.104.114.84.95
Last change on this file since 5ec2f12d was 5ec2f12d, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/21/05 at 07:20:13

New header guards.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/**
2 * @file rtems/posix/pthreadmp.h
3 */
4
5/*  pthreadmp.h
6 *
7 *  This include file contains all the constants and structures associated
8 *  with the Multiprocessing Support in the POSIX Threads Manager.
9 *
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_POSIX_PTHREADMP_H
21#define _RTEMS_POSIX_PTHREADMP_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <rtems/score/mppkt.h>
28#include <rtems/score/object.h>
29#include <rtems/score/thread.h>
30#include <rtems/score/watchdog.h>
31
32/*
33 *  The following enumerated type defines the list of
34 *  remote pthread operations.
35 */
36
37typedef enum {
38  POSIX_THREADS_MP_ANNOUNCE_CREATE  =  0,
39  POSIX_THREADS_MP_ANNOUNCE_DELETE  =  1,
40  POSIX_THREADS_MP_EXTRACT_PROXY    =  2,
41  POSIX_THREADS_MP_OBTAIN_REQUEST   =  3,
42  POSIX_THREADS_MP_OBTAIN_RESPONSE  =  4,
43  POSIX_THREADS_MP_RELEASE_REQUEST  =  5,
44  POSIX_THREADS_MP_RELEASE_RESPONSE =  6
45}   POSIX_Threads_MP_Remote_operations;
46
47/*
48 *  The following data structure defines the packet used to perform
49 *  remote pthread operations.
50 */
51
52typedef struct {
53  MP_packet_Prefix                    Prefix;
54  POSIX_Threads_MP_Remote_operations  operation;
55  Objects_Name                        name;
56  boolean                             wait;
57  Objects_Id                          proxy_id;
58}   POSIX_Threads_MP_Packet;
59
60/*
61 *  _POSIX_Threads_MP_Send_process_packet
62 *
63 *  DESCRIPTION:
64 *
65 *  This routine performs a remote procedure call so that a
66 *  process operation can be performed on another node.
67 */
68
69void _POSIX_Threads_MP_Send_process_packet (
70  POSIX_Threads_MP_Remote_operations  operation,
71  Objects_Id                          pthread_id,
72  Objects_Name                        name,
73  Objects_Id                          proxy_id
74);
75
76/*
77 *  _POSIX_Threads_MP_Send_request_packet
78 *
79 *  DESCRIPTION:
80 *
81 *  This routine performs a remote procedure call so that a
82 *  directive operation can be initiated on another node.
83 */
84
85int _POSIX_Threads_MP_Send_request_packet (
86  POSIX_Threads_MP_Remote_operations  operation,
87  Objects_Id                          pthread_id,
88  boolean                             wait,
89  Watchdog_Interval                   timeout
90);
91
92/*
93 *  _POSIX_Threads_MP_Send_response_packet
94 *
95 *  DESCRIPTION:
96 *
97 *  This routine performs a remote procedure call so that a
98 *  directive can be performed on another node.
99 */
100
101void _POSIX_Threads_MP_Send_response_packet (
102  POSIX_Threads_MP_Remote_operations   operation,
103  Objects_Id                           pthread_id,
104  Thread_Control                      *the_thread
105);
106
107/*
108 *
109 *  _POSIX_Threads_MP_Process_packet
110 *
111 *  DESCRIPTION:
112 *
113 *  This routine performs the actions specific to this package for
114 *  the request from another node.
115 */
116
117void _POSIX_Threads_MP_Process_packet (
118  MP_packet_Prefix *the_packet_prefix
119);
120
121/*
122 *  _POSIX_Threads_MP_Send_object_was_deleted
123 *
124 *  DESCRIPTION:
125 *
126 *  This routine is invoked indirectly by the thread queue
127 *  when a proxy has been removed from the thread queue and
128 *  the remote node must be informed of this.
129 */
130
131void _POSIX_Threads_MP_Send_object_was_deleted (
132  Thread_Control *the_proxy
133);
134
135/*
136 *  _POSIX_Threads_MP_Send_extract_proxy
137 *
138 *  DESCRIPTION:
139 *
140 *  This routine is invoked when a task is deleted and it
141 *  has a proxy which must be removed from a thread queue and
142 *  the remote node must be informed of this.
143 */
144
145void _POSIX_Threads_MP_Send_extract_proxy (
146  Thread_Control *the_thread
147);
148
149/*
150 *  _POSIX_Threads_MP_Get_packet
151 *
152 *  DESCRIPTION:
153 *
154 *  This function is used to obtain a pthread mp packet.
155 */
156
157POSIX_Threads_MP_Packet *_POSIX_Threads_MP_Get_packet ( void );
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif
164/* end of file */
Note: See TracBrowser for help on using the repository browser.