aboutsummaryrefslogtreecommitdiffstats
path: root/src/chsem.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-05 10:59:11 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-03-05 10:59:11 +0000
commit5e64a9fec2e17d008b9488faa027d2beaa130a88 (patch)
tree3ab9255111b62d78d755bc51d9e650e63b07be25 /src/chsem.c
parent0778745ee12a4f14c001bd205e05728cc01e9633 (diff)
downloadChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.tar.gz
ChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.tar.bz2
ChibiOS-5e64a9fec2e17d008b9488faa027d2beaa130a88.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@215 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chsem.c')
-rw-r--r--src/chsem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/chsem.c b/src/chsem.c
index 47ea2fc50..cbbac8909 100644
--- a/src/chsem.c
+++ b/src/chsem.c
@@ -31,7 +31,7 @@
* @param n initial value of the semaphore counter. Must be non-negative.
* @note Can be called with interrupts disabled or enabled.
*/
-void chSemInit(Semaphore *sp, t_cnt n) {
+void chSemInit(Semaphore *sp, cnt_t n) {
chDbgAssert(n >= 0, "chsem.c, chSemInit()");
fifo_init(&sp->s_queue);
@@ -46,7 +46,7 @@ void chSemInit(Semaphore *sp, t_cnt n) {
* instead than a signal because the \p chSemWait() will return
* \p RDY_RESET instead of \p RDY_OK.
*/
-void chSemReset(Semaphore *sp, t_cnt n) {
+void chSemReset(Semaphore *sp, cnt_t n) {
chSysLock();
@@ -65,8 +65,8 @@ void chSemReset(Semaphore *sp, t_cnt n) {
* \p RDY_RESET instead of \p RDY_OK.
* @note This function does not reschedule.
*/
-void chSemResetI(Semaphore *sp, t_cnt n) {
- t_cnt cnt;
+void chSemResetI(Semaphore *sp, cnt_t n) {
+ cnt_t cnt;
chDbgAssert(n >= 0, "chsem.c, chSemResetI()");
cnt = sp->s_cnt;
@@ -80,8 +80,8 @@ void chSemResetI(Semaphore *sp, t_cnt n) {
* @param sp pointer to a \p Semaphore structure
* @return the function can return \p RDY_OK or \p RDY_RESET.
*/
-t_msg chSemWait(Semaphore *sp) {
- t_msg msg;
+msg_t chSemWait(Semaphore *sp) {
+ msg_t msg;
chSysLock();
@@ -98,7 +98,7 @@ t_msg chSemWait(Semaphore *sp) {
* @note This function must be called with interrupts disabled.
* @note This function cannot be called by an interrupt handler.
*/
-t_msg chSemWaitS(Semaphore *sp) {
+msg_t chSemWaitS(Semaphore *sp) {
if (--sp->s_cnt < 0) {
fifo_insert(currp, &sp->s_queue);
@@ -116,8 +116,8 @@ t_msg chSemWaitS(Semaphore *sp) {
* @param time the number of ticks before the operation fails
* @return the function can return \p RDY_OK, \p RDY_TIMEOUT or \p RDY_RESET.
*/
-t_msg chSemWaitTimeout(Semaphore *sp, t_time time) {
- t_msg msg;
+msg_t chSemWaitTimeout(Semaphore *sp, systime_t time) {
+ msg_t msg;
chSysLock();
@@ -137,7 +137,7 @@ t_msg chSemWaitTimeout(Semaphore *sp, t_time time) {
* @note The function is available only if the \p CH_USE_SEMAPHORES_TIMEOUT
* option is enabled in \p chconf.h.
*/
-t_msg chSemWaitTimeoutS(Semaphore *sp, t_time time) {
+msg_t chSemWaitTimeoutS(Semaphore *sp, systime_t time) {
if (--sp->s_cnt < 0) {
fifo_insert(currp, &sp->s_queue);