ubinos
signal.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 Sung Ho Park
3  Contact: ubinos.org@gmail.com
4 
5  This file is part of the itf_ubinos component of the Ubinos.
6 
7  GNU General Public License Usage
8  This file may be used under the terms of the GNU
9  General Public License version 3.0 as published by the Free Software
10  Foundation and appearing in the file license_gpl3.txt included in the
11  packaging of this file. Please review the following information to
12  ensure the GNU General Public License version 3.0 requirements will be
13  met: http://www.gnu.org/copyleft/gpl.html.
14 
15  GNU Lesser General Public License Usage
16  Alternatively, this file may be used under the terms of the GNU Lesser
17  General Public License version 2.1 as published by the Free Software
18  Foundation and appearing in the file license_lgpl.txt included in the
19  packaging of this file. Please review the following information to
20  ensure the GNU Lesser General Public License version 2.1 requirements
21  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22 
23  Commercial Usage
24  Alternatively, licensees holding valid commercial licenses may
25  use this file in accordance with the commercial license agreement
26  provided with the software or, alternatively, in accordance with the
27  terms contained in a written agreement between you and rightful owner.
28  */
29 
30 #ifndef UBIK_SIGNAL_H_
31 #define UBIK_SIGNAL_H_
32 
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37 
53 #include <ubinos_config.h>
54 #include <ubinos/type.h>
55 
56 #include "task.h"
57 
59 typedef struct __signal_tip_t
60 {
61  unsigned int type :8;
62  unsigned int valid :1;
63  unsigned int reserved :7;
64  unsigned int reserved2 :16;
66 
69 
80 int signal_create(signal_pt * signal_p);
81 
95 int signal_create_ext(signal_pt * signal_p, unsigned int option);
96 
108 int signal_delete(signal_pt * signal_p);
109 
122 int signal_wait(signal_pt signal);
123 
139 int signal_wait_timed(signal_pt signal, unsigned int tick);
140 
156 int signal_wait_timedms(signal_pt signal, unsigned int timems);
157 
170 int signal_send(signal_pt signal, int sigtype);
171 
184 int signal_broadcast(signal_pt signal, int sigtype);
185 
199 int signal_setsender(signal_pt signal, task_pt task);
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif /* UBIK_SIGNAL_H_ */
task.h
ubik task API
signal_create_ext
int signal_create_ext(signal_pt *signal_p, unsigned int option)
__signal_tip_t::valid
unsigned int valid
Definition: signal.h:62
__signal_tip_t::reserved2
unsigned int reserved2
Definition: signal.h:64
signal_broadcast
int signal_broadcast(signal_pt signal, int sigtype)
signal_create
int signal_create(signal_pt *signal_p)
__signal_tip_t::reserved
unsigned int reserved
Definition: signal.h:63
type.h
ubinos basic data type
__task_tip_t
Definition: task.h:361
signal_send
int signal_send(signal_pt signal, int sigtype)
_signal_tip_t
struct __signal_tip_t _signal_tip_t
signal_pt
_signal_tip_t * signal_pt
Definition: signal.h:68
signal_wait_timed
int signal_wait_timed(signal_pt signal, unsigned int tick)
signal_delete
int signal_delete(signal_pt *signal_p)
__signal_tip_t
Definition: signal.h:59
signal_setsender
int signal_setsender(signal_pt signal, task_pt task)
signal_wait_timedms
int signal_wait_timedms(signal_pt signal, unsigned int timems)
__signal_tip_t::type
unsigned int type
Definition: signal.h:61
signal_wait
int signal_wait(signal_pt signal)