annotate packages/kernel/current/include/kapi.h @ 2729:74dbf4c3f2e1 after-copyright-change-20090129

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