[6c2675d] | 1 | /** |
---|
[cf301c9] | 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @brief POSIX Timers Private Support |
---|
[21242c2] | 5 | * |
---|
| 6 | * This include file contains all the private support information for |
---|
| 7 | * POSIX timers. |
---|
[6c2675d] | 8 | */ |
---|
| 9 | |
---|
[21242c2] | 10 | /* |
---|
| 11 | * Initial Implementation: |
---|
| 12 | * COPYRIGHT (c) 1998. Alfonso Escalera Piña |
---|
[71f2a83d] | 13 | * Largely rewritten by Joel Sherrill (1999). |
---|
| 14 | * |
---|
| 15 | * COPYRIGHT (c) 1999-2013. |
---|
| 16 | * On-Line Applications Research Corporation (OAR). |
---|
[0747e2d] | 17 | * |
---|
| 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 20 | * http://www.rtems.org/license/LICENSE. |
---|
[0747e2d] | 21 | */ |
---|
| 22 | |
---|
[5ec2f12d] | 23 | #ifndef _RTEMS_POSIX_PTIMER_H |
---|
| 24 | #define _RTEMS_POSIX_PTIMER_H |
---|
[0747e2d] | 25 | |
---|
[a0e6c73] | 26 | /** |
---|
[cf301c9] | 27 | * @defgroup POSIX_PRIV_TIMERS POSIX Timers |
---|
[a0e6c73] | 28 | * |
---|
[a15eaaf] | 29 | * @ingroup POSIXAPI |
---|
[a0e6c73] | 30 | */ |
---|
[b697bc6] | 31 | /**@{**/ |
---|
[0747e2d] | 32 | #ifdef __cplusplus |
---|
| 33 | extern "C" { |
---|
| 34 | #endif |
---|
| 35 | |
---|
| 36 | #include <rtems/posix/config.h> |
---|
| 37 | |
---|
[71f2a83d] | 38 | /** |
---|
| 39 | * @brief POSIX Timer Manager Initialization |
---|
[0747e2d] | 40 | * |
---|
| 41 | * This routine performs the initialization necessary for this manager. |
---|
| 42 | */ |
---|
[309e2f6] | 43 | void _POSIX_Timer_Manager_initialization(void); |
---|
[0747e2d] | 44 | |
---|
[71f2a83d] | 45 | /** |
---|
[a0e6c73] | 46 | * @brief Create a Per-Process Timer |
---|
[0747e2d] | 47 | */ |
---|
| 48 | int timer_create( |
---|
| 49 | clockid_t clock_id, |
---|
| 50 | struct sigevent *evp, |
---|
| 51 | timer_t *timerid |
---|
| 52 | ); |
---|
| 53 | |
---|
[71f2a83d] | 54 | /** |
---|
| 55 | * @brief Delete a Per-Process Timer |
---|
[0747e2d] | 56 | */ |
---|
| 57 | int timer_delete( |
---|
| 58 | timer_t timerid |
---|
| 59 | ); |
---|
| 60 | |
---|
[71f2a83d] | 61 | /** |
---|
| 62 | * @brief Set a Per-Process Timer |
---|
[0747e2d] | 63 | */ |
---|
| 64 | int timer_settime( |
---|
| 65 | timer_t timerid, |
---|
| 66 | int flags, |
---|
| 67 | const struct itimerspec *value, |
---|
| 68 | struct itimerspec *ovalue |
---|
| 69 | ); |
---|
| 70 | |
---|
[71f2a83d] | 71 | /** |
---|
| 72 | * @brief Set a Per-Process Timer |
---|
[0747e2d] | 73 | */ |
---|
| 74 | int timer_gettime( |
---|
| 75 | timer_t timerid, |
---|
| 76 | struct itimerspec *value |
---|
| 77 | ); |
---|
| 78 | |
---|
[e49a36cb] | 79 | /** |
---|
[71f2a83d] | 80 | * @brief Get overrun count for a Per-Process Timer |
---|
[e49a36cb] | 81 | * |
---|
[cf301c9] | 82 | * The expiration of a timer must increase by one a counter. |
---|
| 83 | * After the signal handler associated to the timer finishes |
---|
| 84 | * its execution, _POSIX_Timer_TSR will have to set this counter to 0. |
---|
[0747e2d] | 85 | */ |
---|
| 86 | int timer_getoverrun( |
---|
| 87 | timer_t timerid |
---|
| 88 | ); |
---|
[cf301c9] | 89 | |
---|
| 90 | /** @} */ |
---|
| 91 | |
---|
[0747e2d] | 92 | #endif |
---|