source: rtems/cpukit/rtems/src/schedulergetprocessorset.c @ 1240aade

5
Last change on this file since 1240aade was 7a4b2645, checked in by Joel Sherrill <joel@…>, on 01/11/17 at 15:43:06

Remove obsolete RTEMS_HAVE_SYS_CPUSET_H

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/rtems/tasks.h>
20#include <rtems/score/cpusetimpl.h>
21#include <rtems/score/schedulerimpl.h>
22
23rtems_status_code rtems_scheduler_get_processor_set(
24  rtems_id   scheduler_id,
25  size_t     cpusetsize,
26  cpu_set_t *cpuset
27)
28{
29  const Scheduler_Control *scheduler;
30
31  if ( cpuset == NULL ) {
32    return RTEMS_INVALID_ADDRESS;
33  }
34
35  scheduler = _Scheduler_Get_by_id( scheduler_id );
36  if ( scheduler == NULL ) {
37    return RTEMS_INVALID_ID;
38  }
39
40  if ( !_CPU_set_Is_large_enough( cpusetsize ) ) {
41    return RTEMS_INVALID_NUMBER;
42  }
43
44  _Scheduler_Get_processor_set( scheduler, cpusetsize, cpuset );
45
46  return RTEMS_SUCCESSFUL;
47}
Note: See TracBrowser for help on using the repository browser.