source: rtems/cpukit/posix/src/sysconf.c @ 39cefdd

4.104.114.84.95
Last change on this file since 39cefdd was 39cefdd, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/23/04 at 13:07:29

2004-03-23 Ralf Corsepius <ralf_corsepius@…>

  • posix/include/rtems/posix/cond.h, posix/include/rtems/posix/intr.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/intr.c, posix/src/key.c, posix/src/keycreate.c, posix/src/keydelete.c, posix/src/keygetspecific.c, posix/src/keyrundestructors.c, posix/src/keysetspecific.c, posix/src/killinfo.c, posix/src/mqueue.c, posix/src/mqueuerecvsupp.c, posix/src/mqueuesendsupp.c, posix/src/mqueuetranslatereturncode.c, posix/src/mutex.c, posix/src/posixintervaltotimespec.c, posix/src/posixtimespecsubtract.c, posix/src/psignal.c, posix/src/pthread.c, posix/src/ptimer1.c, posix/src/semaphore.c, posix/src/sysconf.c: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 696 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#if HAVE_CONFIG_H
6#include "config.h"
7#endif
8
9#include <time.h>
10#include <unistd.h>
11#include <errno.h>
12
13#include <rtems/system.h>
14#include <rtems/score/tod.h>
15
16/*PAGE
17 *
18 *  4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 95
19 */
20
21long sysconf(
22  int name
23)
24{
25
26  switch (name) {
27    case _SC_CLK_TCK:
28      return _TOD_Ticks_per_second;
29
30    case _SC_OPEN_MAX: {
31        extern uint32_t   rtems_libio_number_iops;
32        return rtems_libio_number_iops;
33      }
34
35    case _SC_GETPW_R_SIZE_MAX:
36        return 1024;
37
38#if defined(__sparc__)
39    case 515: /* Solaris _SC_STACK_PROT */
40     return 0;
41#endif
42
43    default:
44      break;
45  }
46
47  errno = EINVAL;
48  return -1;
49}
Note: See TracBrowser for help on using the repository browser.