- java.lang.Object
-
- de.ibapl.jnhw.posix.Sched
-
@Include("#include <sched.h>") public class Sched extends Object
Wrapper around the<pthread.h>header. See specs at: sched.h - execution scheduling.- Author:
- aploese
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSched.Sched_paramPOSIX:structure sched_param.
-
Field Summary
Fields Modifier and Type Field Description static booleanHAVE_SCHED_Hstatic intSCHED_FIFOPOSIX[PS|TPS]: First in -first out(FIFO) scheduling policy.static intSCHED_OTHERPOSIX[PS|TPS]: Another scheduling policy.static intSCHED_RRPOSIX[PS|TPS]: Round robin scheduling policy.static IntDefineSCHED_SPORADICPOSIX[SS|TPS]: Sporadic server scheduling policy.
-
Constructor Summary
Constructors Constructor Description Sched()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intsched_get_priority_max(int policy)static intsched_get_priority_min(int policy)static voidsched_getparam(int pid, Sched.Sched_param param)static intsched_getscheduler(int pid)POSIX[TPS]: sched_getscheduler - get scheduling policy (REALTIME) .static voidsched_rr_get_interval(int pid, Time.Timespec interval)static voidsched_setparam(int pid, Sched.Sched_param param)static intsched_setscheduler(int pid, int policy, Sched.Sched_param param)static voidsched_yield()POSIX[TPS]: sched_yield - yield the processor.
-
-
-
Field Detail
-
HAVE_SCHED_H
public static final boolean HAVE_SCHED_H
-
SCHED_FIFO
@Define public static final int SCHED_FIFO
POSIX[PS|TPS]: First in -first out(FIFO) scheduling policy.
-
SCHED_RR
@Define public static final int SCHED_RR
POSIX[PS|TPS]: Round robin scheduling policy.
-
SCHED_SPORADIC
@Define public static final IntDefine SCHED_SPORADIC
POSIX[SS|TPS]: Sporadic server scheduling policy.
-
SCHED_OTHER
@Define public static final int SCHED_OTHER
POSIX[PS|TPS]: Another scheduling policy.
-
-
Method Detail
-
sched_get_priority_max
public static final int sched_get_priority_max(int policy) throws NativeErrorException- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
sched_get_priority_min
public static final int sched_get_priority_min(int policy) throws NativeErrorException- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
sched_getparam
public static final void sched_getparam(int pid, Sched.Sched_param param) throws NativeErrorException, NoSuchNativeMethodException- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method sched_getparam is not available natively.
-
sched_getscheduler
public static final int sched_getscheduler(int pid) throws NativeErrorException, NoSuchNativeMethodExceptionPOSIX[TPS]: sched_getscheduler - get scheduling policy (REALTIME) .- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method sched_getscheduler is not available natively.
-
sched_rr_get_interval
public static final void sched_rr_get_interval(int pid, Time.Timespec interval) throws NativeErrorException, NoSuchNativeMethodException- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method sched_rr_get_interval is not available natively.
-
sched_setparam
public static final void sched_setparam(int pid, Sched.Sched_param param) throws NativeErrorException, NoSuchNativeMethodException- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method sched_setparam is not available natively.
-
sched_setscheduler
public static final int sched_setscheduler(int pid, int policy, Sched.Sched_param param) throws NativeErrorException, NoSuchNativeMethodException- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method sched_setscheduler is not available natively.
-
sched_yield
public static final void sched_yield() throws NativeErrorExceptionPOSIX[TPS]: sched_yield - yield the processor.- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
-