base/ipc/sem/sem.c File Reference


Detailed Description

Semaphore functions.

Author:
Paolo Mantegazza
Note:
Copyright (C) 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 sem.c.#include <rtai_schedcore.h>
#include <rtai_sem.h>
#include <rtai_rwl.h>
#include <rtai_spl.h>
#include <rtai_registry.h>

Include dependency graph for sem.c:

Include dependency graph

Go to the source code of this file.

Functions

 MODULE_LICENSE ("GPL")
void rt_typed_sem_init (SEM *sem, int value, int type)
 Initialize a specifically typed (counting, binary, resource) semaphore.
void rt_sem_init (SEM *sem, int value)
 Initialize a counting semaphore.
int rt_sem_delete (SEM *sem)
 Delete a semaphore.
int rt_sem_count (SEM *sem)
int rt_sem_signal (SEM *sem)
 Signaling a semaphore.
int rt_sem_broadcast (SEM *sem)
 Signaling a semaphore.
int rt_sem_wait (SEM *sem)
 Take a semaphore.
int rt_sem_wait_if (SEM *sem)
 Take a semaphore, only if the calling task is not blocked.
int rt_sem_wait_until (SEM *sem, RTIME time)
 Wait a semaphore with timeout.
int rt_sem_wait_timed (SEM *sem, RTIME delay)
 Wait a semaphore with timeout.
int rt_sem_wait_barrier (SEM *sem)
 Wait on a semaphore barrier.
int rt_cond_signal (CND *cnd)
 Wait for a signal to a conditional variable.
int rt_cndmtx_signal (SEM *mtx, RT_TASK *rt_current)
int rt_cond_wait (CND *cnd, SEM *mtx)
 Wait for a signal to a conditional variable.
int rt_cond_wait_until (CND *cnd, SEM *mtx, RTIME time)
 Wait a semaphore with timeout.
int rt_cond_wait_timed (CND *cnd, SEM *mtx, RTIME delay)
 Wait a semaphore with timeout.
int rt_rwl_init (RWL *rwl)
 Initialize a multi readers single writer lock.
int rt_rwl_delete (RWL *rwl)
 destroys a multi readers single writer lock.
int rt_rwl_rdlock (RWL *rwl)
 acquires a multi readers single writer lock for reading.
int rt_rwl_rdlock_if (RWL *rwl)
 try to acquire a multi readers single writer lock just for reading.
int rt_rwl_rdlock_until (RWL *rwl, RTIME time)
 try to acquire a multi readers single writer lock for reading within an absolute deadline time.
int rt_rwl_rdlock_timed (RWL *rwl, RTIME delay)
 try to acquire a multi readers single writer lock for reading within a relative deadline time.
int rt_rwl_wrlock (RWL *rwl)
 acquires a multi readers single writer lock for wrtiting.
int rt_rwl_wrlock_if (RWL *rwl)
 acquires a multi readers single writer lock for writing.
int rt_rwl_wrlock_until (RWL *rwl, RTIME time)
 try to acquire a multi readers single writer lock for writing within an absolute deadline time.
int rt_rwl_wrlock_timed (RWL *rwl, RTIME delay)
 try to acquire a multi readers single writer lock for writing within a relative deadline time.
int rt_rwl_unlock (RWL *rwl)
 unlock an acquired multi readers single writer lock.
int rt_spl_init (SPL *spl)
 Initialize a spinlock.
int rt_spl_delete (SPL *spl)
 Initialize a spinlock.
int rt_spl_lock (SPL *spl)
 Acquire a spinlock.
int rt_spl_lock_if (SPL *spl)
 Acquire a spinlock without waiting.
int rt_spl_lock_timed (SPL *spl, unsigned long ns)
 Acquire a spinlock with timeout.
int rt_spl_unlock (SPL *spl)
 Release an owned spinlock.
SEM_rt_typed_named_sem_init (unsigned long sem_name, int value, int type)
 Initialize a specifically typed (counting, binary, resource) semaphore identified by a name.
int rt_named_sem_delete (SEM *sem)
 Delete a semaphore initialized in named mode.
RWL_rt_named_rwl_init (unsigned long rwl_name)
 Initialize a multi readers single writer lock identified by a name.
int rt_named_rwl_delete (RWL *rwl)
 Delete a multi readers single writer lock in named mode.
SPL_rt_named_spl_init (unsigned long spl_name)
 Initialize a spinlock identified by a name.
int rt_named_spl_delete (SPL *spl)
 Delete a spinlock in named mode.
int set_rt_fun_entries (struct rt_native_fun_entry *entry)
void reset_rt_fun_entries (struct rt_native_fun_entry *entry)
int __rtai_sem_init (void)
void __rtai_sem_exit (void)
 module_init (__rtai_sem_init)
 module_exit (__rtai_sem_exit)
 EXPORT_SYMBOL (rt_typed_sem_init)
 EXPORT_SYMBOL (rt_sem_init)
 EXPORT_SYMBOL (rt_sem_delete)
 EXPORT_SYMBOL (rt_sem_count)
 EXPORT_SYMBOL (rt_sem_signal)
 EXPORT_SYMBOL (rt_sem_broadcast)
 EXPORT_SYMBOL (rt_sem_wait)
 EXPORT_SYMBOL (_rt_typed_named_sem_init)
 EXPORT_SYMBOL (rt_named_sem_delete)
 EXPORT_SYMBOL (rt_cond_signal)
 EXPORT_SYMBOL (rt_cond_wait)
 EXPORT_SYMBOL (rt_rwl_init)
 EXPORT_SYMBOL (rt_rwl_delete)
 EXPORT_SYMBOL (rt_rwl_rdlock)
 EXPORT_SYMBOL (rt_rwl_wrlock)
 EXPORT_SYMBOL (rt_rwl_unlock)
 EXPORT_SYMBOL (_rt_named_rwl_init)
 EXPORT_SYMBOL (rt_named_rwl_delete)
 EXPORT_SYMBOL (rt_spl_init)
 EXPORT_SYMBOL (rt_spl_delete)
 EXPORT_SYMBOL (rt_spl_lock)
 EXPORT_SYMBOL (rt_spl_unlock)
 EXPORT_SYMBOL (_rt_named_spl_init)
 EXPORT_SYMBOL (rt_named_spl_delete)

Variables

rt_native_fun_entry rt_sem_entries []


Function Documentation

EXPORT_SYMBOL rt_named_spl_delete   ) 
 

EXPORT_SYMBOL _rt_named_spl_init   ) 
 

EXPORT_SYMBOL rt_spl_unlock   ) 
 

EXPORT_SYMBOL rt_spl_lock   ) 
 

EXPORT_SYMBOL rt_spl_delete   ) 
 

EXPORT_SYMBOL rt_spl_init   ) 
 

EXPORT_SYMBOL rt_named_rwl_delete   ) 
 

EXPORT_SYMBOL _rt_named_rwl_init   ) 
 

EXPORT_SYMBOL rt_rwl_unlock   ) 
 

EXPORT_SYMBOL rt_rwl_wrlock   ) 
 

EXPORT_SYMBOL rt_rwl_rdlock   ) 
 

EXPORT_SYMBOL rt_rwl_delete   ) 
 

EXPORT_SYMBOL rt_rwl_init   ) 
 

EXPORT_SYMBOL rt_cond_wait   ) 
 

EXPORT_SYMBOL rt_cond_signal   ) 
 

EXPORT_SYMBOL rt_named_sem_delete   ) 
 

EXPORT_SYMBOL _rt_typed_named_sem_init   ) 
 

EXPORT_SYMBOL rt_sem_wait   ) 
 

EXPORT_SYMBOL rt_sem_broadcast   ) 
 

EXPORT_SYMBOL rt_sem_signal   ) 
 

EXPORT_SYMBOL rt_sem_count   ) 
 

EXPORT_SYMBOL rt_sem_delete   ) 
 

EXPORT_SYMBOL rt_sem_init   ) 
 

EXPORT_SYMBOL rt_typed_sem_init   ) 
 

module_exit __rtai_sem_exit   ) 
 

module_init __rtai_sem_init   ) 
 


Generated on Thu Nov 20 11:55:15 2008 for RTAI API by doxygen 1.3.8