base/include/rtai_sem.h File Reference


Detailed Description

Author:
Paolo Mantegazza
Note:
Copyright © 1999-2003 Paolo Mantegazza <mantegazza@aero.polimi.it>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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 <rtai_types.h>
#include <rtai_nam2num.h>
#include <rtai_sched.h>
#include <rtai_lxrt.h>

Include dependency graph for rtai_sem.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  rt_semaphore

Defines

#define RT_SEM_MAGIC   0x3f83ebb
#define SEM_TIMOUT   (0xFffe)
#define SEM_ERR   (0xFfff)
#define rt_sem_init(name, value)   rt_typed_sem_init(name, value, CNT_SEM)
#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)
#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

SEMrt_typed_sem_init (unsigned long name, int value, int type)
int rt_sem_delete (SEM *sem)
SEMrt_typed_named_sem_init (const char *name, int value, int type)
int rt_named_sem_delete (SEM *sem)
int rt_sem_signal (SEM *sem)
int rt_sem_broadcast (SEM *sem)
int rt_sem_wait (SEM *sem)
int rt_sem_wait_if (SEM *sem)
int rt_sem_wait_until (SEM *sem, RTIME time)
int rt_sem_wait_timed (SEM *sem, RTIME delay)
int rt_sem_wait_barrier (SEM *sem)
int rt_sem_count (SEM *sem)
int rt_cond_signal (CND *cnd)
int rt_cond_wait (CND *cnd, SEM *mutex)
int rt_cond_wait_until (CND *cnd, SEM *mutex, RTIME time)
int rt_cond_wait_timed (CND *cnd, SEM *mutex, RTIME delay)


Define Documentation

#define rt_cond_broadcast cnd   )     rt_sem_broadcast(cnd)
 

Definition at line 344 of file rtai_sem.h.

#define rt_cond_delete cnd   )     rt_sem_delete(cnd)
 

Definition at line 342 of file rtai_sem.h.

#define rt_cond_destroy cnd   )     rt_sem_delete(cnd)
 

Definition at line 343 of file rtai_sem.h.

#define rt_cond_timedwait cnd,
mtx,
time   )     rt_cond_wait_until(cnd, mtx, time)
 

Definition at line 345 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 257 of file rtai_sem.h.

#define RT_SEM_MAGIC   0x3f83ebb
 

Definition at line 31 of file rtai_sem.h.

Referenced by rt_cond_signal(), rt_cond_wait(), rt_cond_wait_until(), rt_sem_broadcast(), rt_sem_delete(), rt_sem_signal(), rt_sem_wait(), rt_sem_wait_barrier(), rt_sem_wait_if(), rt_sem_wait_until(), and rt_typed_sem_init().

#define SEM_ERR   (0xFfff)
 

Definition at line 35 of file rtai_sem.h.

Referenced by _rt_mbx_receive_until(), _rt_mbx_send_until(), hard_stub_fun(), mbx_wait(), mbx_wait_until(), port_server_fun(), rt_cond_signal(), rt_cond_wait(), rt_cond_wait_until(), rt_named_rwl_delete(), rt_named_sem_delete(), rt_rwl_delete(), rt_rwl_rdlock(), rt_rwl_rdlock_until(), rt_sem_broadcast(), rt_sem_delete(), rt_sem_signal(), rt_sem_wait(), rt_sem_wait_barrier(), rt_sem_wait_if(), rt_sem_wait_until(), and soft_stub_fun().

#define SEM_TIMOUT   (0xFffe)
 

Definition at line 33 of file rtai_sem.h.

Referenced by _rt_msg_broadcast(), _rt_msg_broadcast_until(), _rt_msg_receive(), _rt_msg_receive_until(), _rt_msg_send(), _rt_msg_send_until(), mbx_wait_until(), pthread_cond_timedwait_rt(), rt_cond_wait_until(), rt_rwl_rdlock(), rt_rwl_rdlock_until(), rt_rwl_wrlock(), rt_rwl_wrlock_until(), rt_sem_wait_until(), and rt_task_suspend_until().


Typedef Documentation

typedef SEM CND
 

Definition at line 56 of file rtai_sem.h.

Referenced by rt_cond_signal(), rt_cond_wait(), rt_cond_wait_timed(), and rt_cond_wait_until().

typedef struct rt_semaphore SEM
 

Referenced by _rt_typed_named_sem_init(), clr_rtext(), handle_lxrt_request(), hard_stub_fun(), lxrt_typed_sem_init(), net_resume_task(), rt_change_prio(), rt_cndmtx_signal(), rt_cond_wait(), rt_cond_wait_timed(), rt_cond_wait_until(), rt_named_bits_init(), rt_named_sem_delete(), RT_named_sem_delete(), rt_sem_broadcast(), RT_sem_broadcast(), rt_sem_count(), rt_sem_delete(), rt_sem_init(), rt_sem_signal(), RT_sem_signal(), rt_sem_wait(), RT_sem_wait(), rt_sem_wait_barrier(), rt_sem_wait_if(), RT_sem_wait_if(), rt_sem_wait_timed(), RT_sem_wait_timed(), rt_sem_wait_until(), RT_sem_wait_until(), rt_task_masked_unblock(), rt_typed_named_sem_init(), RT_typed_named_sem_init(), rt_typed_sem_init(), sched_sem_signal(), and soft_stub_fun().


Function Documentation

int rt_cond_signal CND cnd  )  [inline]
 

Definition at line 347 of file rtai_sem.h.

References BIDX, CND, COND_SIGNAL, rtai_lxrt_t::i, LOW, rtai_lxrt(), and SIZARG.

Here is the call graph for this function:

int rt_cond_wait CND cnd,
SEM mutex
[inline]
 

Definition at line 353 of file rtai_sem.h.

References BIDX, CND, COND_WAIT, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, and SIZARG.

Here is the call graph for this function:

int rt_cond_wait_timed CND cnd,
SEM mutex,
RTIME  delay
[inline]
 

Definition at line 365 of file rtai_sem.h.

References BIDX, CND, COND_WAIT_TIMED, rtai_lxrt_t::i, LOW, rtai_lxrt(), RTIME, SEM, and SIZARG.

Here is the call graph for this function:

int rt_cond_wait_until CND cnd,
SEM mutex,
RTIME  time
[inline]
 

Definition at line 359 of file rtai_sem.h.

References BIDX, CND, COND_WAIT_UNTIL, rtai_lxrt_t::i, LOW, rtai_lxrt(), RTIME, SEM, and SIZARG.

Here is the call graph for this function:

int rt_named_sem_delete SEM sem  )  [inline]
 

Definition at line 272 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, NAMED_SEM_DELETE, rtai_lxrt(), SEM, and SIZARG.

Here is the call graph for this function:

int rt_sem_broadcast SEM sem  )  [inline]
 

Definition at line 284 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_BROADCAST, and SIZARG.

Here is the call graph for this function:

int rt_sem_count SEM sem  )  [inline]
 

Definition at line 320 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_COUNT, and SIZARG.

Here is the call graph for this function:

int rt_sem_delete SEM sem  )  [inline]
 

Definition at line 260 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, LXRT_SEM_DELETE, rtai_lxrt(), SEM, and SIZARG.

Here is the call graph for this function:

int rt_sem_signal SEM sem  )  [inline]
 

Definition at line 278 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_SIGNAL, and SIZARG.

Here is the call graph for this function:

int rt_sem_wait SEM sem  )  [inline]
 

Definition at line 290 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_WAIT, and SIZARG.

Referenced by port_server_fun(), and soft_stub_fun().

Here is the call graph for this function:

int rt_sem_wait_barrier SEM sem  )  [inline]
 

Definition at line 314 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_WAIT_BARRIER, and SIZARG.

Here is the call graph for this function:

int rt_sem_wait_if SEM sem  )  [inline]
 

Definition at line 296 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), SEM, SEM_WAIT_IF, and SIZARG.

Here is the call graph for this function:

int rt_sem_wait_timed SEM sem,
RTIME  delay
[inline]
 

Definition at line 308 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), RTIME, SEM, SEM_WAIT_TIMED, and SIZARG.

Here is the call graph for this function:

int rt_sem_wait_until SEM sem,
RTIME  time
[inline]
 

Definition at line 302 of file rtai_sem.h.

References BIDX, rtai_lxrt_t::i, LOW, rtai_lxrt(), RTIME, SEM, SEM_WAIT_UNTIL, and SIZARG.

Here is the call graph for this function:

SEM* rt_typed_named_sem_init const char *  name,
int  value,
int  type
[inline]
 

Definition at line 266 of file rtai_sem.h.

References BIDX, LOW, nam2num(), NAMED_SEM_INIT, rtai_lxrt(), SEM, SIZARG, and rtai_lxrt_t::v.

Referenced by RT_typed_named_sem_init().

Here is the call graph for this function:

SEM* rt_typed_sem_init unsigned long  name,
int  value,
int  type
[inline]
 

Definition at line 232 of file rtai_sem.h.

References BIDX, LOW, LXRT_SEM_INIT, rtai_lxrt(), SEM, SIZARG, and rtai_lxrt_t::v.

Here is the call graph for this function:


Generated on Thu Nov 20 11:53:56 2008 for RTAI API by doxygen 1.3.8