source: rtems/cpukit/posix/include/rtems/posix/time.h @ 6a614160

4.104.115
Last change on this file since 6a614160 was 6a614160, checked in by Joel Sherrill <joel.sherrill@…>, on 12/05/08 at 22:27:47

2008-12-05 Joel Sherrill <joel.sherrill@…>

  • score/include/rtems/score/timespec.h: Remove unnecessary includes. Fix typo.
  • posix/include/rtems/posix/time.h, score/src/coretodget.c, score/src/coretodgetuptime.c: Add required include files which were formerly included from timespec.h
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file rtems/posix/time.h
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2008.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef _RTEMS_POSIX_TIME_H
17#define _RTEMS_POSIX_TIME_H
18
19#include <rtems/score/timespec.h>
20#include <rtems/score/watchdog.h>
21
22/** @brief Absolute Timeout Conversion Results
23 *
24 *  This enumeration defines the possible results of converting
25 *  an absolute time used for timeouts to POSIX blocking calls to
26 *  a number of ticks.
27 */
28typedef enum {
29  /** The timeout is invalid. */
30  POSIX_ABSOLUTE_TIMEOUT_INVALID,
31  /** The timeout represents a time that is in the past. */
32  POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST,
33  /** The timeout represents a time that is equal to the current time. */
34  POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
35  /** The timeout represents a time that is in the future. */
36  POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE,
37} POSIX_Absolute_timeout_conversion_results_t;
38
39/**
40 *  @brief Convert Absolute Timeout to Ticks
41 *
42 *  This method takes an absolute time being used as a timeout
43 *  to a blocking directive, validates it and returns the number
44 *  of corresponding clock ticks for use by the SuperCore.
45 *
46 *  @param[in] abstime is the timeout
47 *  @param[in] ticks_out will contain the number of ticks
48 *
49 *  @return This method returns the number of ticks in @a ticks_out
50 *          and a status value indicating whether the absolute time
51 *          is valid, in the past, equal to the current time or in
52 *          the future as it should be.
53 */
54POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
55  const struct timespec *abstime,
56  Watchdog_Interval     *ticks_out
57);
58
59#endif
Note: See TracBrowser for help on using the repository browser.