annotate packages/kernel/current/include/kapi.h @ 1539:57cebf53b527

* include/kapi.h: Add throw specifications throughout. * src/kapi.cxx: Ditto. * include/sched.inl: Move include of thread.inl further down to allow Cyg_Scheduler inlines to be defined first. * include/thread.inl: Reorder destructors section and include sched.inl right before it to solve mutual header dependency problems.
author jlarmour
date Mon, 15 Mar 2004 15:20:53 +0000
parents 1b465c781382
children 74dbf4c3f2e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #ifndef CYGONCE_KERNEL_KAPI_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #define CYGONCE_KERNEL_KAPI_H
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
3
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
4 /*==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
5 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
6 // kapi.h
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
7 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
8 // Native API for Kernel
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
9 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
10 //==========================================================================
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
11 //####ECOSGPLCOPYRIGHTBEGIN####
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
12 // -------------------------------------------
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
13 // This file is part of eCos, the Embedded Configurable Operating System.
263
c0d53837cb68 Allow configurations which have the kernel but not the memalloc
bartv
parents: 215
diff changeset
14 // Copyright (C) 2002 Bart Veer
460
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
15 // Copyright (C) 2002 Nick Garnett
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
16 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
17 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
18 // eCos is free software; you can redistribute it and/or modify it under
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
19 // the terms of the GNU General Public License as published by the Free
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
20 // Software Foundation; either version 2 or (at your option) any later version.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
21 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
22 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
23 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
24 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
25 // for more details.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
26 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
27 // You should have received a copy of the GNU General Public License along
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
28 // with eCos; if not, write to the Free Software Foundation, Inc.,
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
29 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
30 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
31 // As a special exception, if other files instantiate templates or use macros
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
32 // or inline functions from this file, or you compile this file and link it
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
33 // with other works to produce a work based on this file, this file does not
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
34 // by itself cause the resulting work to be covered by the GNU General Public
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
35 // License. However the source code for this file must still be made available
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
36 // in accordance with section (3) of the GNU General Public License.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
37 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
38 // This exception does not invalidate any other reasons why a work based on
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
39 // this file might be covered by the GNU General Public License.
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
40 //
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
41 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
210
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
42 // at http://sources.redhat.com/ecos/ecos-license/
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
43 // -------------------------------------------
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
44 //####ECOSGPLCOPYRIGHTEND####
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
45 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
46 //#####DESCRIPTIONBEGIN####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
47 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
48 // Author(s): nickg, dsm
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
49 // Contributors: nickg
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
50 // Date: 1998-03-02
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
51 // Purpose: Native API for Kernel
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
52 // Description: This file describes the native API for using the kernel.
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
53 // It is essentially a set of C wrappers for the C++ class
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
54 // member functions.
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
55 // Usage: #include <cyg/kernel/kapi.h>
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
56 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
57 //####DESCRIPTIONEND####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
59 //========================================================================*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
60
263
c0d53837cb68 Allow configurations which have the kernel but not the memalloc
bartv
parents: 215
diff changeset
61 #include <pkgconf/system.h>
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
62 #include <pkgconf/kernel.h>
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
63
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
64 #ifdef CYGFUN_KERNEL_API_C
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
65 #include <cyg/infra/cyg_type.h>
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
67 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
68
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
69 #ifdef __cplusplus
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
70 extern "C" {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
71 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
72
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
73 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
74 /* The following are derived types, they may have different */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
75 /* definitions from these depending on configuration. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
76
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
77 typedef CYG_ADDRWORD cyg_addrword_t; /* May hold pointer or word */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
78 typedef cyg_addrword_t cyg_handle_t; /* Object handle */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
79 typedef cyg_uint32 cyg_priority_t; /* type for priorities */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
80 typedef cyg_int32 cyg_code_t; /* type for various codes */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
81 typedef cyg_uint32 cyg_vector_t; /* Interrupt vector id */
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
82 typedef cyg_uint32 cyg_cpu_t; /* CPU id type */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
83
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
84 typedef cyg_uint64 cyg_tick_count_t;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
85
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
86 typedef int cyg_bool_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
87
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
88 /* Exception handler function definition */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
89 typedef void cyg_exception_handler_t(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
90 cyg_addrword_t data,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
91 cyg_code_t exception_number,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
92 cyg_addrword_t info
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
93 );
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
94
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
95 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
96 struct cyg_thread;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
97 typedef struct cyg_thread cyg_thread;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
98
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
99 struct cyg_interrupt;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
100 typedef struct cyg_interrupt cyg_interrupt;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
101
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
102 struct cyg_counter;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
103 typedef struct cyg_counter cyg_counter;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
104
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
105 struct cyg_clock;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
106 typedef struct cyg_clock cyg_clock;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
107
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
108 struct cyg_alarm;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
109 typedef struct cyg_alarm cyg_alarm;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
110
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
111 struct cyg_mbox;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
112 typedef struct cyg_mbox cyg_mbox;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
113
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
114 struct cyg_sem_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
115 typedef struct cyg_sem_t cyg_sem_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
116
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
117 struct cyg_flag_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
118 typedef struct cyg_flag_t cyg_flag_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
119
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
120 struct cyg_mutex_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
121 typedef struct cyg_mutex_t cyg_mutex_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
122
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
123 struct cyg_cond_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
124 typedef struct cyg_cond_t cyg_cond_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
125
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
126 struct cyg_spinlock_t;
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
127 typedef struct cyg_spinlock_t cyg_spinlock_t;
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
128
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
129 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
130 /* Scheduler operations */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
131
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
132 /* Starts scheduler with created threads. Never returns. */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
133 void cyg_scheduler_start(void) __THROW CYGBLD_ATTRIB_NORET;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
134
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
135 /* Lock and unlock the scheduler. When the scheduler is */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
136 /* locked thread preemption is disabled. */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
137 void cyg_scheduler_lock(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
138
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
139 void cyg_scheduler_unlock(void) __THROW;
84
489eb5632bc3 Merge from eCos master repository on 2000-04-28-18:44:39-BST
jlarmour
parents: 66
diff changeset
140
489eb5632bc3 Merge from eCos master repository on 2000-04-28-18:44:39-BST
jlarmour
parents: 66
diff changeset
141 /* Just like 'cyg_scheduler_lock()', but never take the lock higher than 1 */
489eb5632bc3 Merge from eCos master repository on 2000-04-28-18:44:39-BST
jlarmour
parents: 66
diff changeset
142 /* Thus this call is safe even if the scheduler is already locked and a */
489eb5632bc3 Merge from eCos master repository on 2000-04-28-18:44:39-BST
jlarmour
parents: 66
diff changeset
143 /* subsequent call to 'cyg_scheduler_unlock()' will completely unlock. */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
144 void cyg_scheduler_safe_lock(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
145
105
5a0cc6c243a9 Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents: 84
diff changeset
146 /* Read the scheduler lock value. */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
147 cyg_ucount32 cyg_scheduler_read_lock(void) __THROW;
105
5a0cc6c243a9 Merge from eCos master repository on 2000-06-30-08:18:49-BST
jlarmour
parents: 84
diff changeset
148
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
149 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
150 /* Thread operations */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
151
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
152 typedef void cyg_thread_entry_t(cyg_addrword_t);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
153
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
154 void cyg_thread_create(
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
155 cyg_addrword_t sched_info, /* scheduling info (eg pri) */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
156 cyg_thread_entry_t *entry, /* entry point function */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
157 cyg_addrword_t entry_data, /* entry data */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
158 char *name, /* optional thread name */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
159 void *stack_base, /* stack base, NULL = alloc */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
160 cyg_ucount32 stack_size, /* stack size, 0 = default */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
161 cyg_handle_t *handle, /* returned thread handle */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
162 cyg_thread *thread /* put thread here */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
163 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
164
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
165 void cyg_thread_exit(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
166
8
ece80412419a Merge from eCos master repository on 1999-05-21-22:05:54-BST
jlarmour
parents: 2
diff changeset
167 /* It may be necessary to arrange for the victim to run for it to disappear */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
168 cyg_bool_t cyg_thread_delete(cyg_handle_t thread) __THROW; /* false if NOT deleted */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
169
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
170 void cyg_thread_suspend(cyg_handle_t thread) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
171
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
172 void cyg_thread_resume(cyg_handle_t thread) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
173
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
174 void cyg_thread_kill(cyg_handle_t thread) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
175
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
176 void cyg_thread_release(cyg_handle_t thread) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
177
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
178 void cyg_thread_yield(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
179
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
180 cyg_handle_t cyg_thread_self(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
181
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
182 cyg_handle_t cyg_thread_idle_thread(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
183
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
184 /* Priority manipulation */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
185
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
186 void cyg_thread_set_priority(cyg_handle_t thread, cyg_priority_t priority ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
187
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
188 cyg_priority_t cyg_thread_get_priority(cyg_handle_t thread) __THROW;
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
189 cyg_priority_t cyg_thread_get_current_priority(cyg_handle_t thread) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
190
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
191 /* Deadline scheduling control (optional) */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
192
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
193 void cyg_thread_deadline_wait(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
194 cyg_tick_count_t start_time, /* abs earliest start time */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
195 cyg_tick_count_t run_time, /* worst case execution time */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
196 cyg_tick_count_t deadline /* absolute deadline */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
197 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
198
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
199 void cyg_thread_delay(cyg_tick_count_t delay) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
200
10
d3fbcdfa1b2f Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents: 8
diff changeset
201 /* Stack information */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
202 cyg_addrword_t cyg_thread_get_stack_base(cyg_handle_t thread) __THROW;
10
d3fbcdfa1b2f Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents: 8
diff changeset
203
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
204 cyg_uint32 cyg_thread_get_stack_size(cyg_handle_t thread) __THROW;
10
d3fbcdfa1b2f Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents: 8
diff changeset
205
147
d397fc472bcf Merge from eCos master repository on 2001-01-05-06:43:02-GMT
jlarmour
parents: 115
diff changeset
206 #ifdef CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
207 cyg_uint32 cyg_thread_measure_stack_usage(cyg_handle_t thread) __THROW;
147
d397fc472bcf Merge from eCos master repository on 2001-01-05-06:43:02-GMT
jlarmour
parents: 115
diff changeset
208 #endif
10
d3fbcdfa1b2f Merge from eCos master repository on 1999-05-29-00:13:11-BST
jlarmour
parents: 8
diff changeset
209
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
210 /*---------------------------------------------------------------------------*/
460
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
211 /* Thread enumeration and information */
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
212
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
213 typedef struct
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
214 {
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
215 cyg_handle_t handle;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
216 cyg_uint16 id;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
217 cyg_uint32 state;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
218 char *name;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
219 cyg_priority_t set_pri;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
220 cyg_priority_t cur_pri;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
221 cyg_addrword_t stack_base;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
222 cyg_uint32 stack_size;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
223 cyg_uint32 stack_used;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
224 } cyg_thread_info;
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
225
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
226 cyg_bool_t cyg_thread_get_next( cyg_handle_t *thread, cyg_uint16 *id ) __THROW;
460
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
227
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
228 cyg_bool_t cyg_thread_get_info( cyg_handle_t thread,
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
229 cyg_uint16 id,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
230 cyg_thread_info *info ) __THROW;
460
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
231
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
232 cyg_uint16 cyg_thread_get_id( cyg_handle_t thread ) __THROW;
1436
1b465c781382 New API for cyg_thread_get_id() - from Dan Jakubiec
gthomas
parents: 460
diff changeset
233
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
234 cyg_handle_t cyg_thread_find( cyg_uint16 id ) __THROW;
460
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
235
a65a4055f146 * src/common/kapi.cxx:
nickg
parents: 263
diff changeset
236 /*---------------------------------------------------------------------------*/
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
237 /* Per-thread Data */
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
238
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
239 #ifdef CYGVAR_KERNEL_THREADS_DATA
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
240
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
241 cyg_ucount32 cyg_thread_new_data_index(void) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
242
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
243 void cyg_thread_free_data_index(cyg_ucount32 index) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
244
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
245 CYG_ADDRWORD cyg_thread_get_data(cyg_ucount32 index) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
246
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
247 CYG_ADDRWORD *cyg_thread_get_data_ptr(cyg_ucount32 index) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
248
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
249 void cyg_thread_set_data(cyg_ucount32 index, CYG_ADDRWORD data) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
250
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
251 #endif
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
252
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
253 /*---------------------------------------------------------------------------*/
210
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
254 /* Thread destructors */
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
255
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
256 #ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
257
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
258 typedef void (*cyg_thread_destructor_fn)(cyg_addrword_t);
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
259
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
260 cyg_bool_t cyg_thread_add_destructor( cyg_thread_destructor_fn fn,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
261 cyg_addrword_t data ) __THROW;
210
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
262 cyg_bool_t cyg_thread_rem_destructor( cyg_thread_destructor_fn fn,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
263 cyg_addrword_t data ) __THROW;
210
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
264 #endif
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
265
d2c90368aeef Merge from eCos master repository on 2002-05-23-21:39:14-BST
jlarmour
parents: 208
diff changeset
266 /*---------------------------------------------------------------------------*/
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
267 /* Exception handling. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
268
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
269 /* Replace current exception handler, this may apply to either the */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
270 /* current thread, or to a global exception handler. The exception */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
271 /* number may be ignored, or used to specify a particular handler. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
272
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
273 void cyg_exception_set_handler(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
274 cyg_code_t exception_number,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
275 cyg_exception_handler_t *new_handler,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
276 cyg_addrword_t new_data,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
277 cyg_exception_handler_t **old_handler,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
278 cyg_addrword_t *old_data
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
279 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
280
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
281 /* Clear exception hander to default value */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
282 void cyg_exception_clear_handler(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
283 cyg_code_t exception_number
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
284 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
285
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
286 /* Invoke exception handler */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
287 void cyg_exception_call_handler(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
288 cyg_handle_t thread,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
289 cyg_code_t exception_number,
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
290 cyg_addrword_t exception_info
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
291 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
292
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
293
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
294 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
295 /* Interrupt handling */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
296 typedef void cyg_VSR_t(void);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
297 typedef cyg_uint32 cyg_ISR_t(cyg_vector_t vector, cyg_addrword_t data);
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
298 typedef void cyg_DSR_t( cyg_vector_t vector,
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
299 cyg_ucount32 count,
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
300 cyg_addrword_t data);
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
301
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
302
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
303 enum cyg_ISR_results
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
304 {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
305 CYG_ISR_HANDLED = 1, /* Interrupt was handled */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
306 CYG_ISR_CALL_DSR = 2 /* Schedule DSR */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
307 };
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
308
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
309 void cyg_interrupt_create(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
310 cyg_vector_t vector, /* Vector to attach to */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
311 cyg_priority_t priority, /* Queue priority */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
312 cyg_addrword_t data, /* Data pointer */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
313 cyg_ISR_t *isr, /* Interrupt Service Routine */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
314 cyg_DSR_t *dsr, /* Deferred Service Routine */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
315 cyg_handle_t *handle, /* returned handle */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
316 cyg_interrupt *intr /* put interrupt here */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
317 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
318
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
319 void cyg_interrupt_delete( cyg_handle_t interrupt ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
320
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
321 void cyg_interrupt_attach( cyg_handle_t interrupt ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
322
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
323 void cyg_interrupt_detach( cyg_handle_t interrupt ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
324
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
325 /* VSR manipulation */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
326
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
327 void cyg_interrupt_get_vsr(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
328 cyg_vector_t vector, /* vector to get */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
329 cyg_VSR_t **vsr /* vsr got */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
330 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
331
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
332 void cyg_interrupt_set_vsr(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
333 cyg_vector_t vector, /* vector to set */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
334 cyg_VSR_t *vsr /* vsr to set */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
335 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
336
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
337 /* CPU level interrupt mask */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
338 void cyg_interrupt_disable(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
339
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
340 void cyg_interrupt_enable(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
341
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
342 /* Interrupt controller access */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
343 void cyg_interrupt_mask(cyg_vector_t vector) __THROW;
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
344 void cyg_interrupt_mask_intunsafe(cyg_vector_t vector) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
345
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
346 void cyg_interrupt_unmask(cyg_vector_t vector) __THROW;
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
347 void cyg_interrupt_unmask_intunsafe(cyg_vector_t vector) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
348
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
349 void cyg_interrupt_acknowledge(cyg_vector_t vector) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
350
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
351 void cyg_interrupt_configure(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
352 cyg_vector_t vector, /* vector to configure */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
353 cyg_bool_t level, /* level or edge triggered */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
354 cyg_bool_t up /* rising/faling edge, high/low level*/
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
355 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
356
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
357 void cyg_interrupt_set_cpu(
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
358 cyg_vector_t vector, /* vector to control */
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
359 cyg_cpu_t cpu /* CPU to set */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
360 ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
361
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
362 cyg_cpu_t cyg_interrupt_get_cpu(
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
363 cyg_vector_t vector /* vector to control */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
364 ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
365
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
366 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
367 /* Counters, Clocks and Alarms */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
368
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
369 void cyg_counter_create(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
370 cyg_handle_t *handle, /* returned counter handle */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
371 cyg_counter *counter /* put counter here */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
372 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
373
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
374 void cyg_counter_delete(cyg_handle_t counter) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
375
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
376 /* Return current value of counter */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
377 cyg_tick_count_t cyg_counter_current_value(cyg_handle_t counter) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
378
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
379 /* Set new current value */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
380 void cyg_counter_set_value(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
381 cyg_handle_t counter,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
382 cyg_tick_count_t new_value
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
383 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
384
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
385 /* Advance counter by one tick */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
386 void cyg_counter_tick(cyg_handle_t counter) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
387
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
388 /* Advance counter by multiple ticks */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
389 void cyg_counter_multi_tick(cyg_handle_t counter, cyg_tick_count_t _ticks) __THROW;
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
390
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
391
181
d61da071934c Merge from eCos master repository on 2001-08-22-06:38:55-BST
jlarmour
parents: 179
diff changeset
392 #define CYG_RESOLUTION_T_MEMBERS \
d61da071934c Merge from eCos master repository on 2001-08-22-06:38:55-BST
jlarmour
parents: 179
diff changeset
393 cyg_uint32 dividend; \
d61da071934c Merge from eCos master repository on 2001-08-22-06:38:55-BST
jlarmour
parents: 179
diff changeset
394 cyg_uint32 divisor;
d61da071934c Merge from eCos master repository on 2001-08-22-06:38:55-BST
jlarmour
parents: 179
diff changeset
395
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
396 typedef struct
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
397 {
181
d61da071934c Merge from eCos master repository on 2001-08-22-06:38:55-BST
jlarmour
parents: 179
diff changeset
398 CYG_RESOLUTION_T_MEMBERS
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
399 } cyg_resolution_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
400
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
401 /* Create a clock object */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
402 void cyg_clock_create(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
403 cyg_resolution_t resolution, /* Initial resolution */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
404 cyg_handle_t *handle, /* Returned clock handle */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
405 cyg_clock *clock /* put clock here */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
406 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
407
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
408 void cyg_clock_delete(cyg_handle_t clock) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
409
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
410 /* convert a clock handle to a counter handle so we can use the */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
411 /* counter API on it. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
412 void cyg_clock_to_counter(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
413 cyg_handle_t clock,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
414 cyg_handle_t *counter
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
415 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
416
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
417 void cyg_clock_set_resolution(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
418 cyg_handle_t clock,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
419 cyg_resolution_t resolution /* New resolution */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
420 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
421
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
422 cyg_resolution_t cyg_clock_get_resolution(cyg_handle_t clock) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
423
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
424 /* handle of real time clock */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
425 cyg_handle_t cyg_real_time_clock(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
426
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
427 /* returns value of real time clock's counter.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
428 This is the same as:
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
429 (cyg_clock_to_counter(cyg_real_time_clock(), &h),
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
430 cyg_counter_current_value(h)) */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
431 cyg_tick_count_t cyg_current_time(void) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
432
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
433 /* Alarm handler function */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
434 typedef void cyg_alarm_t(cyg_handle_t alarm, cyg_addrword_t data);
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
435
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
436 void cyg_alarm_create(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
437 cyg_handle_t counter, /* Attached to this counter */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
438 cyg_alarm_t *alarmfn, /* Call-back function */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
439 cyg_addrword_t data, /* Call-back data */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
440 cyg_handle_t *handle, /* Returned alarm object */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
441 cyg_alarm *alarm /* put alarm here */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
442 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
443
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
444 /* Disable alarm, detach from counter and invalidate handles */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
445 void cyg_alarm_delete( cyg_handle_t alarm) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
446
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
447 void cyg_alarm_initialize(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
448 cyg_handle_t alarm,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
449 cyg_tick_count_t trigger, /* Absolute trigger time */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
450 cyg_tick_count_t interval /* Relative retrigger interval */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
451 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
452
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
453 void cyg_alarm_get_times(
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
454 cyg_handle_t alarm,
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
455 cyg_tick_count_t *trigger, /* Next trigger time */
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
456 cyg_tick_count_t *interval /* Current interval */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
457 ) __THROW;
208
e0c0827131d1 Merge from eCos master repository on 2002-05-20-20:11:54-BST
jlarmour
parents: 181
diff changeset
458
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
459 void cyg_alarm_enable( cyg_handle_t alarm ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
460
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
461 void cyg_alarm_disable( cyg_handle_t alarm ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
462
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
463 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
464 /* Mail boxes */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
465 void cyg_mbox_create(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
466 cyg_handle_t *handle,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
467 cyg_mbox *mbox
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
468 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
469
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
470 void cyg_mbox_delete(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
471
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
472 void *cyg_mbox_get(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
473
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
474 #ifdef CYGFUN_KERNEL_THREADS_TIMER
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
475 void *cyg_mbox_timed_get(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
476 cyg_handle_t mbox,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
477 cyg_tick_count_t abstime
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
478 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
479 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
480
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
481 void *cyg_mbox_tryget(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
482
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
483 void *cyg_mbox_peek_item(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
484
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
485 #ifdef CYGMFN_KERNEL_SYNCH_MBOXT_PUT_CAN_WAIT
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
486 cyg_bool_t cyg_mbox_put(cyg_handle_t mbox, void *item) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
487 #ifdef CYGFUN_KERNEL_THREADS_TIMER
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
488 cyg_bool_t cyg_mbox_timed_put(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
489 cyg_handle_t mbox,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
490 void *item,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
491 cyg_tick_count_t abstime
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
492 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
493 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
494 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
495
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
496 cyg_bool_t cyg_mbox_tryput(cyg_handle_t mbox, void *item) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
497
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
498 cyg_count32 cyg_mbox_peek(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
499
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
500 cyg_bool_t cyg_mbox_waiting_to_get(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
501
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
502 cyg_bool_t cyg_mbox_waiting_to_put(cyg_handle_t mbox) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
503
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
504
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
505 /*-----------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
506 /* Memory pools */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
507
115
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 105
diff changeset
508 /* These definitions are found in the "memalloc" package as this is */
6ed91473a1cd Merge from eCos master repository on 2000-08-21-22:40:54-BST
jlarmour
parents: 105
diff changeset
509 /* where the implementation lives. */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
510
263
c0d53837cb68 Allow configurations which have the kernel but not the memalloc
bartv
parents: 215
diff changeset
511 #ifdef CYGPKG_MEMALLOC
c0d53837cb68 Allow configurations which have the kernel but not the memalloc
bartv
parents: 215
diff changeset
512 # include <cyg/memalloc/kapi.h>
c0d53837cb68 Allow configurations which have the kernel but not the memalloc
bartv
parents: 215
diff changeset
513 #endif
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
514
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
515 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
516 /* Semaphores */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
517
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
518 void cyg_semaphore_init(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
519 cyg_sem_t *sem, /* Semaphore to init */
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
520 cyg_count32 val /* Initial semaphore value */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
521 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
522
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
523 void cyg_semaphore_destroy( cyg_sem_t *sem ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
524
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
525 cyg_bool_t cyg_semaphore_wait( cyg_sem_t *sem ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
526
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
527 #ifdef CYGFUN_KERNEL_THREADS_TIMER
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
528 cyg_bool_t cyg_semaphore_timed_wait(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
529 cyg_sem_t *sem,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
530 cyg_tick_count_t abstime
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
531 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
532 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
533
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
534 cyg_bool_t cyg_semaphore_trywait( cyg_sem_t *sem ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
535
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
536 void cyg_semaphore_post( cyg_sem_t *sem ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
537
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
538 void cyg_semaphore_peek( cyg_sem_t *sem, cyg_count32 *val ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
539
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
540 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
541 /* Flags */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
542
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
543 typedef cyg_uint32 cyg_flag_value_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
544 typedef cyg_uint8 cyg_flag_mode_t;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
545 #define CYG_FLAG_WAITMODE_AND ((cyg_flag_mode_t)0) /* all bits must be set */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
546 #define CYG_FLAG_WAITMODE_OR ((cyg_flag_mode_t)2) /* any bit must be set */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
547 #define CYG_FLAG_WAITMODE_CLR ((cyg_flag_mode_t)1) /* clear when satisfied */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
548
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
549 void cyg_flag_init(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
550 cyg_flag_t *flag /* Flag to init */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
551 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
552
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
553 void cyg_flag_destroy( cyg_flag_t *flag ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
554
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
555 /* bitwise-or in the bits in value; awaken any waiting tasks whose
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
556 condition is now satisfied */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
557 void cyg_flag_setbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
558
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
559 /* bitwise-and with the the bits in value; this clears the bits which
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
560 are not set in value. No waiting task can be awoken. */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
561 void cyg_flag_maskbits( cyg_flag_t *flag, cyg_flag_value_t value) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
562
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
563 /* wait for the flag value to match the pattern, according to the mode.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
564 If mode includes CLR, set the flag value to zero when
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
565 our pattern is matched. The return value is that which matched
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
566 the request, or zero for an error/timeout return.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
567 Value must not itself be zero. */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
568 cyg_flag_value_t cyg_flag_wait( cyg_flag_t *flag,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
569 cyg_flag_value_t pattern,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
570 cyg_flag_mode_t mode ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
571
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
572 #ifdef CYGFUN_KERNEL_THREADS_TIMER
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
573 cyg_flag_value_t cyg_flag_timed_wait( cyg_flag_t *flag,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
574 cyg_flag_value_t pattern,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
575 cyg_flag_mode_t mode,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
576 cyg_tick_count_t abstime ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
577
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
578 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
579
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
580 cyg_flag_value_t cyg_flag_poll( cyg_flag_t *flag,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
581 cyg_flag_value_t pattern,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
582 cyg_flag_mode_t mode ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
583
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
584 cyg_flag_value_t cyg_flag_peek( cyg_flag_t *flag ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
585
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
586 cyg_bool_t cyg_flag_waiting( cyg_flag_t *flag ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
587
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
588 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
589 /* Mutex */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
590
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
591 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
179
391299f9e541 Merge from eCos master repository on 2001-08-17-16:31:54-BST
jlarmour
parents: 177
diff changeset
592 enum cyg_mutex_protocol
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
593 {
179
391299f9e541 Merge from eCos master repository on 2001-08-17-16:31:54-BST
jlarmour
parents: 177
diff changeset
594 CYG_MUTEX_NONE = 0, // no inversion protocol
391299f9e541 Merge from eCos master repository on 2001-08-17-16:31:54-BST
jlarmour
parents: 177
diff changeset
595 CYG_MUTEX_INHERIT, // priority inheritance protocol
391299f9e541 Merge from eCos master repository on 2001-08-17-16:31:54-BST
jlarmour
parents: 177
diff changeset
596 CYG_MUTEX_CEILING // priority ceiling protocol
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
597 };
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
598 #endif
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
599
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
600 void cyg_mutex_init(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
601 cyg_mutex_t *mutex /* Mutex to init */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
602 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
603
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
604 void cyg_mutex_destroy( cyg_mutex_t *mutex ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
605
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
606 cyg_bool_t cyg_mutex_lock( cyg_mutex_t *mutex ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
607
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
608 cyg_bool_t cyg_mutex_trylock( cyg_mutex_t *mutex ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
609
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
610 void cyg_mutex_unlock( cyg_mutex_t *mutex ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
611
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
612 void cyg_mutex_release( cyg_mutex_t *mutex ) __THROW;
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
613
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
614 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
615 void cyg_mutex_set_ceiling( cyg_mutex_t *mutex, cyg_priority_t priority ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
616 #endif
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
617
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
618 #ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
619 void cyg_mutex_set_protocol ( cyg_mutex_t *mutex, enum cyg_mutex_protocol protocol ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
620 #endif
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
621
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
622 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
623 /* Condition Variables */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
624
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
625 void cyg_cond_init(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
626 cyg_cond_t *cond, /* condition variable to init */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
627 cyg_mutex_t *mutex /* associated mutex */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
628 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
629
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
630 void cyg_cond_destroy( cyg_cond_t *cond ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
631
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
632 cyg_bool_t cyg_cond_wait( cyg_cond_t *cond ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
633
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
634 void cyg_cond_signal( cyg_cond_t *cond ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
635
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
636 void cyg_cond_broadcast( cyg_cond_t *cond ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
637
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
638 #ifdef CYGMFN_KERNEL_SYNCH_CONDVAR_TIMED_WAIT
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
639 cyg_bool_t cyg_cond_timed_wait(
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
640 cyg_cond_t *cond,
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
641 cyg_tick_count_t abstime
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
642 ) __THROW;
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
643 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
644
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
645 /*---------------------------------------------------------------------------*/
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
646 /* Spinlocks */
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
647
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
648 void cyg_spinlock_init(
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
649 cyg_spinlock_t *lock, /* spinlock to initialize */
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
650 cyg_bool_t locked /* init locked or unlocked */
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
651 ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
652
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
653 void cyg_spinlock_destroy( cyg_spinlock_t *lock ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
654
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
655 void cyg_spinlock_spin( cyg_spinlock_t *lock ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
656
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
657 void cyg_spinlock_clear( cyg_spinlock_t *lock ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
658
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
659 cyg_bool_t cyg_spinlock_try( cyg_spinlock_t *lock ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
660
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
661 cyg_bool_t cyg_spinlock_test( cyg_spinlock_t *lock ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
662
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
663 void cyg_spinlock_spin_intsave( cyg_spinlock_t *lock,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
664 cyg_addrword_t *istate ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
665
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
666 void cyg_spinlock_clear_intsave( cyg_spinlock_t *lock,
1539
57cebf53b527 * include/kapi.h: Add throw specifications throughout.
jlarmour
parents: 1436
diff changeset
667 cyg_addrword_t istate ) __THROW;
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
668
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
669 /*---------------------------------------------------------------------------*/
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
670 #ifdef __cplusplus
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
671 }
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
672 #endif
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
673
177
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
674 /*---------------------------------------------------------------------------*/
4c750ce71ae3 Merge from eCos master repository on 2001-08-10-19:22:57-BST
jlarmour
parents: 147
diff changeset
675
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
676 #include <cyg/kernel/kapidata.h>
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
677
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
678 /*---------------------------------------------------------------------------*/
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
679 /* EOF kapi.h */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
680 #endif /* CYGFUN_KERNEL_API_C */
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
681 #endif /* CYGONCE_KERNEL_KAPI_H */