Header file for utils.c.
More...
#include <sched.h>
#include <unistd.h>
#include <errlog.h>
#include <shareLib.h>
Go to the source code of this file.
|
void | strToCpuset (cpu_set_t *cpuset, const char *spec) |
| Convert a cpuset string specification (e.g. "0,2-3") to a cpuset. More...
|
|
void | cpusetToStr (char *set, size_t len, const cpu_set_t *cpuset) |
| Convert a cpuset into its string specification (e.g. "0,2-3"). More...
|
|
const char * | policyToStr (const int policy) |
| Convert scheduling policy to string. More...
|
|
int | strToPolicy (const char *string) |
| Convert string policy specification to policy. More...
|
|
|
epicsShareExtern int | cpuDigits |
| Number of digits needed for a single CPU spec. More...
|
|
Header file for utils.c.
- Author
- Ralph Lange Ralph.nosp@m..Lan.nosp@m.ge@gm.nosp@m.x.de
- Copyright
- Copyright (c) 2012 ITER Organization
-
Distributed subject to the EPICS_BASE Software License Agreement found in the file LICENSE that is included with this distribution.
Definition in file utils.h.
◆ checkStatus
#define checkStatus |
( |
|
status, |
|
|
|
message |
|
) |
| |
Value:if((status)) {\
errlogPrintf("%s error %s\n", (message), strerror((status))); \
}
Definition at line 24 of file utils.h.
◆ NO_OF_CPUS
#define NO_OF_CPUS sysconf(_SC_NPROCESSORS_CONF) |
◆ cpusetToStr()
void cpusetToStr |
( |
char * |
set, |
|
|
size_t |
len, |
|
|
const cpu_set_t * |
cpuset |
|
) |
| |
Convert a cpuset into its string specification (e.g. "0,2-3").
- Parameters
-
set | output buffer to write into |
len | length of set |
cpuset | cpuset to convert |
Definition at line 63 of file utils.c.
◆ policyToStr()
const char* policyToStr |
( |
const int |
policy | ) |
|
Convert scheduling policy to string.
- Parameters
-
- Returns
- string representation
Definition at line 101 of file utils.c.
◆ strToCpuset()
void strToCpuset |
( |
cpu_set_t * |
cpuset, |
|
|
const char * |
spec |
|
) |
| |
Convert a cpuset string specification (e.g. "0,2-3") to a cpuset.
- Parameters
-
cpuset | cpuset to write into |
spec | specification string |
Definition at line 33 of file utils.c.
◆ strToPolicy()
int strToPolicy |
( |
const char * |
string | ) |
|
Convert string policy specification to policy.
- Parameters
-
string | string policy specification |
- Returns
- policy value, or -1 on error
Definition at line 129 of file utils.c.
◆ cpuDigits
epicsShareExtern int cpuDigits |