Header file for utils.c.
More...
#include <sched.h>
#include <unistd.h>
#include <errlog.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.
|
|
void | cpusetToStr (char *set, size_t len, const cpu_set_t *cpuset) |
| Convert a cpuset into its string specification (e.g. "0,2-3").
|
|
const char * | policyToStr (const int policy) |
| Convert scheduling policy to string.
|
|
int | strToPolicy (const char *string) |
| Convert string policy specification to policy.
|
|
|
int | cpuDigits |
| Number of digits needed for a single CPU spec.
|
|
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.
#define checkStatus |
( |
|
status, |
|
|
|
message |
|
) |
| |
Value:if((status)) {\
errlogPrintf("%s error %s\n", (message), strerror((status))); \
}
Definition at line 23 of file utils.h.
#define NO_OF_CPUS sysconf(_SC_NPROCESSORS_CONF) |
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 59 of file utils.c.
const char* policyToStr |
( |
const int |
policy | ) |
|
Convert scheduling policy to string.
- Parameters
-
- Returns
- string representation
Definition at line 96 of file utils.c.
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 29 of file utils.c.
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 124 of file utils.c.