source: rtems/cpukit/score/src/cpusetprintsupport.c @ 0daa8ab

5
Last change on this file since 0daa8ab 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.6 KB
Line 
1/**
2 * @file
3 *
4 * @brief CPU Set Print Support Routines
5 * @ingroup ScoreCpuset
6 */
7
8/*
9 *  COPYRIGHT (c) 2014.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#ifdef HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <string.h>
22#include <stdlib.h>
23#include <stdio.h>
24#include <ctype.h>
25#include <inttypes.h>
26#include <rtems/printer.h>
27#include <rtems/score/cpusetimpl.h>
28
29void _CPU_set_Show_with_plugin(
30  const rtems_printer *printer,
31  const char          *description,
32  const cpu_set_t     *cpuset
33);
34
35/*
36 * _CPU_set_Show_with_plugin
37 *
38 * This routine shows cpuset cpuset using a
39 * print plugin .
40 */
41void _CPU_set_Show_with_plugin(
42  const rtems_printer *printer,
43  const char          *description,
44  const cpu_set_t     *cpuset
45)
46{
47  int i;
48  rtems_printf(printer ,"%s: ", description);
49  for(i=0; i<_NCPUWORDS; i++)
50    rtems_printf(printer ,"%" PRIx32 "", cpuset->__bits[i]);
51  rtems_printf(printer ,"\n");
52}
53
54/*
55 * _CPU_set_Show
56 *
57 * This routine shows a cpuset using the
58 * printk plugin.
59 */
60void _CPU_set_Show( const char *description, const cpu_set_t   *cpuset)
61{
62  rtems_printer printer;
63  rtems_print_printer_printk( &printer );
64  _CPU_set_Show_with_plugin( &printer, description, cpuset );
65}
66
67/*
68 * _CPU_set_Show_default
69 *
70 * This routine shows the default cpuset.
71 */
72void _CPU_set_Show_default( const char *description )
73{
74  const CPU_set_Control *ctl;
75  ctl = _CPU_set_Default();
76  _CPU_set_Show( description, ctl->set );
77}
Note: See TracBrowser for help on using the repository browser.