Skip to content

Commit a73eba1

Browse files
committed
tsk_delay is an alias
1 parent 70acabd commit a73eba1

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

IntrOS/kernel/inc/ostask.h

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@file IntrOS: ostask.h
44
@author Rajmund Szymanski
5-
@date 13.05.2018
5+
@date 25.05.2018
66
@brief This file contains definitions for IntrOS.
77
88
******************************************************************************
@@ -544,6 +544,7 @@ void tsk_join( tsk_t *tsk );
544544

545545
__STATIC_INLINE
546546
void tsk_yield( void ) { core_ctx_switch(); }
547+
547548
__STATIC_INLINE
548549
void tsk_pass ( void ) { core_ctx_switch(); }
549550

@@ -614,6 +615,7 @@ unsigned tsk_sleepUntil( cnt_t time );
614615
/******************************************************************************
615616
*
616617
* Name : tsk_sleepFor
618+
* Alias : tsk_delay
617619
*
618620
* Description : delay execution of current task for given duration of time
619621
*
@@ -630,6 +632,9 @@ unsigned tsk_sleepUntil( cnt_t time );
630632

631633
unsigned tsk_sleepFor( cnt_t delay );
632634

635+
__STATIC_INLINE
636+
unsigned tsk_delay( cnt_t delay ) { return tsk_sleepFor(delay); }
637+
633638
/******************************************************************************
634639
*
635640
* Name : tsk_sleep
@@ -646,26 +651,6 @@ unsigned tsk_sleepFor( cnt_t delay );
646651
__STATIC_INLINE
647652
unsigned tsk_sleep( void ) { return tsk_sleepFor(INFINITE); }
648653

649-
/******************************************************************************
650-
*
651-
* Name : tsk_delay
652-
*
653-
* Description : the same as tsk_sleepFor, delay execution of current task for given duration of time
654-
*
655-
* Parameters
656-
* delay : duration of time (maximum number of ticks to delay execution of current task)
657-
* IMMEDIATE: don't delay execution of current task
658-
* INFINITE: delay indefinitely execution of current task
659-
*
660-
* Return
661-
* E_SUCCESS : task object successfully finished countdown
662-
* E_FAILURE : task was resumed
663-
*
664-
******************************************************************************/
665-
666-
__STATIC_INLINE
667-
unsigned tsk_delay( cnt_t delay ) { return tsk_sleepFor(delay); }
668-
669654
/******************************************************************************
670655
*
671656
* Name : tsk_suspend

0 commit comments

Comments
 (0)