Changeset 40ecd11 in rtems


Ignore:
Timestamp:
Mar 9, 2015, 2:23:20 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3159267
Parents:
8552df6
git-author:
Sebastian Huber <sebastian.huber@…> (03/09/15 14:23:20)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/09/15 14:25:24)
Message:

sysconf: Add _SC_NPROCESSORS_(CONF|ONLN)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/sysconf.c

    r8552df6 r40ecd11  
    4848    case _SC_SYMLOOP_MAX:
    4949      return RTEMS_FILESYSTEM_SYMLOOP_MAX;
     50    case _SC_NPROCESSORS_CONF:
     51      return (long) rtems_configuration_get_maximum_processors();
     52    case _SC_NPROCESSORS_ONLN:
     53      return (long) rtems_get_processor_count();
    5054#if defined(__sparc__)
    5155    case 515: /* Solaris _SC_STACK_PROT */
  • testsuites/psxtests/psxsysconf/init.c

    r8552df6 r40ecd11  
    7474   rtems_test_exit(0);
    7575
     76  rtems_test_assert(
     77    sysconf( _SC_NPROCESSORS_CONF )
     78      == (long) rtems_configuration_get_maximum_processors()
     79  );
     80
     81  rtems_test_assert(
     82    sysconf( _SC_NPROCESSORS_ONLN ) == (long) rtems_get_processor_count()
     83  );
     84
    7685#if defined(__sparc__)
    7786  /* Solaris _SC_STACK_PROT - 515 */
Note: See TracChangeset for help on using the changeset viewer.