This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition in file rtai_sem.h.
Include dependency graph for rtai_sem.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | rt_poll_s |
struct | rt_semaphore |
Defines | |
#define | RT_SEM_MAGIC 0x3f83ebb |
#define | SEM_ERR (RTE_OBJINV) |
#define | SEM_TIMOUT (RTE_TIMOUT) |
#define | RT_POLL_NOT_TO_USE 0 |
#define | RT_POLL_MBX_RECV 1 |
#define | RT_POLL_MBX_SEND 2 |
#define | RT_POLL_SEM_WAIT_ALL 3 |
#define | RT_POLL_SEM_WAIT_ONE 4 |
#define | rt_sem_init(name, value) rt_typed_sem_init(name, value, CNT_SEM) |
Initialize a counting semaphore. | |
#define | rt_named_sem_init(sem_name, value) rt_typed_named_sem_init(sem_name, value, CNT_SEM) |
#define | rt_cond_init(name) rt_typed_sem_init(name, 0, BIN_SEM) |
Initialize a condition variable. | |
#define | rt_cond_delete(cnd) rt_sem_delete(cnd) |
#define | rt_cond_destroy(cnd) rt_sem_delete(cnd) |
#define | rt_cond_broadcast(cnd) rt_sem_broadcast(cnd) |
#define | rt_cond_timedwait(cnd, mtx, time) rt_cond_wait_until(cnd, mtx, time) |
Typedefs | |
typedef rt_semaphore | SEM |
typedef SEM | CND |
Functions | |
static SEM * | rt_typed_sem_init (unsigned long name, int value, int type) |
static int | rt_sem_delete (SEM *sem) |
static SEM * | rt_typed_named_sem_init (const char *name, int value, int type) |
static int | rt_named_sem_delete (SEM *sem) |
static int | rt_sem_signal (SEM *sem) |
static int | rt_sem_broadcast (SEM *sem) |
static int | rt_sem_wait (SEM *sem) |
static int | rt_sem_wait_if (SEM *sem) |
static int | rt_sem_wait_until (SEM *sem, RTIME time) |
static int | rt_sem_wait_timed (SEM *sem, RTIME delay) |
static int | rt_sem_wait_barrier (SEM *sem) |
static int | rt_sem_count (SEM *sem) |
static int | rt_cond_signal (CND *cnd) |
static int | rt_cond_wait (CND *cnd, SEM *mutex) |
static int | rt_cond_wait_until (CND *cnd, SEM *mutex, RTIME time) |
static int | rt_cond_wait_timed (CND *cnd, SEM *mutex, RTIME delay) |
static int | rt_poll (struct rt_poll_s *pdsa, unsigned long nr, RTIME timeout) |
#define rt_cond_broadcast | ( | cnd | ) | rt_sem_broadcast(cnd) |
Definition at line 384 of file rtai_sem.h.
#define rt_cond_delete | ( | cnd | ) | rt_sem_delete(cnd) |
Definition at line 382 of file rtai_sem.h.
#define rt_cond_destroy | ( | cnd | ) | rt_sem_delete(cnd) |
Definition at line 383 of file rtai_sem.h.
#define rt_cond_timedwait | ( | cnd, | |||
mtx, | |||||
time | ) | rt_cond_wait_until(cnd, mtx, time) |
Definition at line 385 of file rtai_sem.h.
#define rt_named_sem_init | ( | sem_name, | |||
value | ) | rt_typed_named_sem_init(sem_name, value, CNT_SEM) |
Definition at line 297 of file rtai_sem.h.
#define RT_POLL_MBX_RECV 1 |
#define RT_POLL_MBX_SEND 2 |
#define RT_POLL_NOT_TO_USE 0 |
Definition at line 39 of file rtai_sem.h.
#define RT_POLL_SEM_WAIT_ALL 3 |
#define RT_POLL_SEM_WAIT_ONE 4 |
#define RT_SEM_MAGIC 0x3f83ebb |
#define SEM_ERR (RTE_OBJINV) |
Definition at line 33 of file rtai_sem.h.
#define SEM_TIMOUT (RTE_TIMOUT) |
Definition at line 34 of file rtai_sem.h.
Definition at line 94 of file rtai_sem.h.
typedef struct rt_semaphore SEM |
static int rt_cond_signal | ( | CND * | cnd | ) | [inline, static] |
Definition at line 387 of file rtai_sem.h.
References BIDX, COND_SIGNAL, rtai_lxrt_t::i, LOW, rtai_lxrt(), and SIZARG.
Here is the call graph for this function:
Definition at line 393 of file rtai_sem.h.
References BIDX, COND_WAIT, rtai_lxrt_t::i, LOW, rtai_lxrt(), and SIZARG.
Here is the call graph for this function:
Definition at line 405 of file rtai_sem.h.
References BIDX, COND_WAIT_TIMED, rtai_lxrt_t::i, LOW, rtai_lxrt(), and SIZARG.
Here is the call graph for this function:
Definition at line 399 of file rtai_sem.h.
References BIDX, COND_WAIT_UNTIL, rtai_lxrt_t::i, LOW, rtai_lxrt(), and SIZARG.
Referenced by rt_cond_wait_timed().
Here is the call graph for this function:
static int rt_named_sem_delete | ( | SEM * | sem | ) | [inline, static] |
Definition at line 312 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, NAMED_SEM_DELETE, rtai_lxrt(), and SIZARG.
Referenced by RT_named_sem_delete().
Here is the call graph for this function:
Definition at line 411 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), RTE_OBJINV, SEM_RT_POLL, and SIZARG.
Here is the call graph for this function:
static int rt_sem_broadcast | ( | SEM * | sem | ) | [inline, static] |
Definition at line 324 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_BROADCAST, and SIZARG.
Referenced by rt_rwl_unlock(), RT_sem_broadcast(), and rt_sem_wait_barrier().
Here is the call graph for this function:
static int rt_sem_count | ( | SEM * | sem | ) | [inline, static] |
Definition at line 360 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_COUNT, and SIZARG.
Here is the call graph for this function:
static int rt_sem_delete | ( | SEM * | sem | ) | [inline, static] |
Definition at line 300 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, LXRT_SEM_DELETE, rtai_lxrt(), and SIZARG.
Referenced by __rtai_netrpc_exit(), _rt_typed_named_sem_init(), rt_mbx_delete(), rt_msgq_delete(), rt_named_sem_delete(), and rt_rwl_delete().
Here is the call graph for this function:
static int rt_sem_signal | ( | SEM * | sem | ) | [inline, static] |
Definition at line 318 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_SIGNAL, and SIZARG.
Referenced by _broadcast(), _receive(), _rt_mbx_ovrwr_send(), _rt_mbx_receive(), _rt_mbx_receive_if(), _rt_mbx_receive_until(), _rt_mbx_receive_wp(), _rt_mbx_send(), _rt_mbx_send_if(), _rt_mbx_send_until(), _rt_mbx_send_wp(), _rt_msg_broadcast(), _rt_msg_broadcast_if(), _rt_msg_broadcast_until(), _rt_msg_receive(), _rt_msg_receive_if(), _rt_msg_receive_until(), _rt_msg_send(), _rt_msg_send_if(), _rt_msg_send_until(), _send(), hard_stub_fun(), mbx_send_if(), net_resume_task(), rt_rwl_unlock(), RT_sem_signal(), soft_stub_fun(), and timer_fun().
Here is the call graph for this function:
static int rt_sem_wait | ( | SEM * | sem | ) | [inline, static] |
Definition at line 330 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_WAIT, and SIZARG.
Referenced by _rt_mbx_receive(), _rt_mbx_send(), _rt_msg_broadcast(), _rt_msg_receive(), _rt_msg_send(), _rt_net_rpc(), hard_stub_fun(), port_server_fun(), rt_cond_wait(), rt_cond_wait_until(), rt_rwl_rdlock(), rt_rwl_wrlock(), RT_sem_wait(), rt_sem_wait_barrier(), rt_send_req_rel_port(), and soft_stub_fun().
Here is the call graph for this function:
static int rt_sem_wait_barrier | ( | SEM * | sem | ) | [inline, static] |
Definition at line 354 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_WAIT_BARRIER, and SIZARG.
Referenced by _broadcast(), and _receive().
Here is the call graph for this function:
static int rt_sem_wait_if | ( | SEM * | sem | ) | [inline, static] |
Definition at line 336 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_WAIT_IF, and SIZARG.
Referenced by _rt_msg_broadcast_if(), _rt_msg_receive_if(), _rt_msg_send_if(), _rt_net_rpc(), rt_rwl_wrlock_if(), and RT_sem_wait_if().
Here is the call graph for this function:
Definition at line 348 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_WAIT_TIMED, and SIZARG.
Referenced by _rt_net_rpc(), and RT_sem_wait_timed().
Here is the call graph for this function:
Definition at line 342 of file rtai_sem.h.
References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM_WAIT_UNTIL, and SIZARG.
Referenced by _rt_mbx_receive_until(), _rt_mbx_send_until(), _rt_msg_broadcast_until(), _rt_msg_receive_until(), _rt_msg_send_until(), rt_rwl_rdlock_until(), rt_rwl_wrlock_until(), rt_sem_wait_timed(), and RT_sem_wait_until().
Here is the call graph for this function:
static SEM* rt_typed_named_sem_init | ( | const char * | name, | |
int | value, | |||
int | type | |||
) | [inline, static] |
Definition at line 306 of file rtai_sem.h.
References BIDX, LOW, NAMED_SEM_INIT, rtai_lxrt(), SIZARG, and rtai_lxrt_t::v.
Referenced by RT_typed_named_sem_init().
Here is the call graph for this function:
static SEM* rt_typed_sem_init | ( | unsigned long | name, | |
int | value, | |||
int | type | |||
) | [inline, static] |
Definition at line 272 of file rtai_sem.h.
References BIDX, LOW, LXRT_SEM_INIT, rt_get_name(), rtai_lxrt(), SIZARG, and rtai_lxrt_t::v.
Referenced by __rtai_netrpc_init(), _broadcast(), _rt_typed_named_sem_init(), rt_msgq_init(), rt_sem_init(), rt_typed_mbx_init(), and rt_typed_rwl_init().
Here is the call graph for this function: