- java.lang.Object
-
- de.ibapl.jnhw.posix.Pthread
-
@Include("#include <pthread.h>") public class Pthread extends Object
Wrapper around the<pthread.h>header. See specs at: pthread.h - threads.- Author:
- aploese
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPthread.Pthread_attr_tPOSIX:typedef pthread_attr_t.static classPthread.Pthread_tPOSIX:typedef pthread_t.
-
Field Summary
Fields Modifier and Type Field Description static booleanHAVE_PTHREAD_Hstatic intPTHREAD_CANCEL_ASYNCHRONOUSPOSIX.TPS:static intPTHREAD_CANCEL_DEFERREDPOSIX.TPS:static intPTHREAD_CANCEL_DISABLEPOSIX.TPS:static intPTHREAD_CANCEL_ENABLEPOSIX.TPS:static intPTHREAD_EXPLICIT_SCHEDPOSIX.TPS:static intPTHREAD_INHERIT_SCHEDPOSIX.TPS:
-
Constructor Summary
Constructors Constructor Description Pthread()
-
Method Summary
-
-
-
Field Detail
-
PTHREAD_EXPLICIT_SCHED
@Define public static final int PTHREAD_EXPLICIT_SCHED
POSIX.TPS:
-
PTHREAD_INHERIT_SCHED
@Define public static final int PTHREAD_INHERIT_SCHED
POSIX.TPS:
-
HAVE_PTHREAD_H
public static final boolean HAVE_PTHREAD_H
-
PTHREAD_CANCEL_DISABLE
@Define public static final int PTHREAD_CANCEL_DISABLE
POSIX.TPS:
-
PTHREAD_CANCEL_ENABLE
@Define public static final int PTHREAD_CANCEL_ENABLE
POSIX.TPS:
-
PTHREAD_CANCEL_DEFERRED
@Define public static final int PTHREAD_CANCEL_DEFERRED
POSIX.TPS:
-
PTHREAD_CANCEL_ASYNCHRONOUS
@Define public static final int PTHREAD_CANCEL_ASYNCHRONOUS
POSIX.TPS:
-
-
Method Detail
-
pthread_self
public static final Pthread.Pthread_t pthread_self()
-
pthread_equal
public static final boolean pthread_equal(Pthread.Pthread_t t1, Pthread.Pthread_t t2)
-
pthread_attr_getinheritsched
public static final int pthread_attr_getinheritsched(Pthread.Pthread_attr_t attr) throws NativeErrorException
- Parameters:
attr-- Returns:
- the value of the native inheritsched arg.
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_attr_getschedparam
public static final void pthread_attr_getschedparam(Pthread.Pthread_attr_t attr, Sched.Sched_param param) throws NativeErrorException
POSIX.TPS: pthread_attr_getschedparam, pthread_attr_setschedparam - get and set the schedparam attribute.- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_attr_setinheritsched
public static final void pthread_attr_setinheritsched(Pthread.Pthread_attr_t attr, int inheritsched) throws NativeErrorException
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_attr_setschedparam
public static final void pthread_attr_setschedparam(Pthread.Pthread_attr_t attr, Sched.Sched_param param) throws NativeErrorException
POSIX.TPS: pthread_attr_getschedparam, pthread_attr_setschedparam - get and set the schedparam attribute.- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_getschedparam
public static final void pthread_getschedparam(Pthread.Pthread_t thread, IntRef policy, Sched.Sched_param param) throws NativeErrorException
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_setschedparam
public static final void pthread_setschedparam(Pthread.Pthread_t thread, int policy, Sched.Sched_param param) throws NativeErrorException
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
pthread_setschedprio
public static final void pthread_setschedprio(Pthread.Pthread_t thread, int prio) throws NativeErrorException, NoSuchNativeMethodException
- Throws:
NativeErrorException- if the return value of the native function indicates an error.NoSuchNativeMethodException- if the method pthread_setschedprio is not available natively.
-
pthread_getcpuclockid
public static final void pthread_getcpuclockid(Pthread.Pthread_t thread_id, IntRef clock_id) throws NativeErrorException
- Throws:
NativeErrorException
-
pthread_attr_destroy
public static final void pthread_attr_destroy(Pthread.Pthread_attr_t attr)
-
pthread_attr_init
public static final void pthread_attr_init(Pthread.Pthread_attr_t attr)
-
-