summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerdefaultpinunpin.c
blob: 4aa2169c8e42cb47529e8aa5a0f632ce8152c9c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * @file
 *
 * @ingroup RTEMSScoreScheduler
 *
 * @brief This source file contains the implementation of
 *   _Scheduler_default_Pin_or_unpin().
 */

/*
 * Copyright (c) 2018 embedded brains GmbH
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.org/license/LICENSE.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems/score/scheduler.h>
#include <rtems/score/interr.h>
#include <rtems/score/smpimpl.h>

void _Scheduler_default_Pin_or_unpin(
  const Scheduler_Control *scheduler,
  Thread_Control          *the_thread,
  Scheduler_Node          *node,
  struct Per_CPU_Control  *cpu
)
{
  (void) scheduler;
  (void) the_thread;
  (void) node;
  (void) cpu;

  if ( _SMP_Get_processor_maximum() > 1 ) {
    _Terminate(
      RTEMS_FATAL_SOURCE_SMP,
      SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED
    );
  }
}