|
| 1 | +package com.nativelibs4java.pthread; |
| 2 | +import org.bridj.BridJ; |
| 3 | +import org.bridj.Callback; |
| 4 | +import org.bridj.Pointer; |
| 5 | +import org.bridj.SizeT; |
| 6 | +import org.bridj.TypedPointer; |
| 7 | +import org.bridj.ann.Library; |
| 8 | +import org.bridj.ann.Ptr; |
| 9 | +import org.bridj.ann.Runtime; |
| 10 | +import org.bridj.cpp.CPPRuntime; |
| 11 | +import static org.bridj.Pointer.*; |
| 12 | +/** |
| 13 | + * Wrapper for library <b>pthread</b><br> |
| 14 | + * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br> |
| 15 | + * a tool written by <a href="http://ochafik.free.fr/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br> |
| 16 | + * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> . |
| 17 | + */ |
| 18 | +@Library("pthread") |
| 19 | +@Runtime(CPPRuntime.class) |
| 20 | +public class PthreadLibrary { |
| 21 | + static { |
| 22 | + BridJ.register(); |
| 23 | + } |
| 24 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 25 | + public static final int PTHREAD_CANCEL_DISABLE = 0; |
| 26 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 27 | + public static final int PTHREAD_PROCESS_SHARED = 1; |
| 28 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 29 | + public static final int PTHREAD_PRIO_PROTECT = 2; |
| 30 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 31 | + public static final int PTHREAD_CANCEL_ENABLE = 1; |
| 32 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 33 | + public static final int PTHREAD_MUTEX_RECURSIVE = 2; |
| 34 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 35 | + public static final int PTHREAD_SCOPE_SYSTEM = 1; |
| 36 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 37 | + public static final int PTHREAD_MUTEX_ERRORCHECK = 1; |
| 38 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 39 | + public static final int PTHREAD_EXPLICIT_SCHED = 2; |
| 40 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 41 | + public static final int PTHREAD_CANCEL_ASYNCHRONOUS = 0; |
| 42 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 43 | + public static final int PTHREAD_PRIO_INHERIT = 1; |
| 44 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 45 | + public static final int PTHREAD_SCOPE_PROCESS = 2; |
| 46 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 47 | + public static final int PTHREAD_PROCESS_PRIVATE = 2; |
| 48 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 49 | + public static final int PTHREAD_CREATE_JOINABLE = 1; |
| 50 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 51 | + public static final int PTHREAD_INHERIT_SCHED = 1; |
| 52 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 53 | + public static final int PTHREAD_PRIO_NONE = 0; |
| 54 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 55 | + public static final int PTHREAD_MUTEX_NORMAL = 0; |
| 56 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 57 | + public static final int PTHREAD_CREATE_DETACHED = 2; |
| 58 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 59 | + public static final Pointer PTHREAD_CANCELED = pointerToAddress(1); |
| 60 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 61 | + public static final int PTHREAD_CANCEL_DEFERRED = 2; |
| 62 | + /// <i>native declaration : /usr/include/pthread.h</i> |
| 63 | + public static final int PTHREAD_MUTEX_DEFAULT = PthreadLibrary.PTHREAD_MUTEX_NORMAL; |
| 64 | + /// <i>native declaration : /usr/include/pthread.h:205</i> |
| 65 | + public static abstract class pthread_atfork_arg1_callback extends Callback<pthread_atfork_arg1_callback > { |
| 66 | + public abstract void apply(); |
| 67 | + }; |
| 68 | + /// <i>native declaration : /usr/include/pthread.h:205</i> |
| 69 | + public static abstract class pthread_atfork_arg2_callback extends Callback<pthread_atfork_arg2_callback > { |
| 70 | + public abstract void apply(); |
| 71 | + }; |
| 72 | + /// <i>native declaration : /usr/include/pthread.h:206</i> |
| 73 | + public static abstract class pthread_atfork_arg3_callback extends Callback<pthread_atfork_arg3_callback > { |
| 74 | + public abstract void apply(); |
| 75 | + }; |
| 76 | + /// <i>native declaration : /usr/include/pthread.h:261</i> |
| 77 | + public static abstract class pthread_create_arg1_callback extends Callback<pthread_create_arg1_callback > { |
| 78 | + public abstract Pointer<? > apply(Pointer<? > voidPtr1); |
| 79 | + }; |
| 80 | + /// <i>native declaration : /usr/include/pthread.h:271</i> |
| 81 | + public static abstract class pthread_key_create_arg1_callback extends Callback<pthread_key_create_arg1_callback > { |
| 82 | + public abstract void apply(Pointer<? > voidPtr1); |
| 83 | + }; |
| 84 | + /// <i>native declaration : /usr/include/pthread.h:290</i> |
| 85 | + public static abstract class pthread_once_arg1_callback extends Callback<pthread_once_arg1_callback > { |
| 86 | + public abstract void apply(); |
| 87 | + }; |
| 88 | + /// <i>native declaration : /usr/include/pthread.h:346</i> |
| 89 | + public static abstract class pthread_create_suspended_np_arg1_callback extends Callback<pthread_create_suspended_np_arg1_callback > { |
| 90 | + public abstract Pointer<? > apply(Pointer<? > voidPtr1); |
| 91 | + }; |
| 92 | + public static native int pthread_atfork(Pointer<PthreadLibrary.pthread_atfork_arg1_callback > arg1, Pointer<PthreadLibrary.pthread_atfork_arg2_callback > arg2, Pointer<PthreadLibrary.pthread_atfork_arg3_callback > arg3); |
| 93 | + public static native int pthread_attr_destroy(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1); |
| 94 | + public static native int pthread_attr_getdetachstate(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Integer > intPtr1); |
| 95 | + public static native int pthread_attr_getguardsize(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<SizeT > size_tPtr1); |
| 96 | + public static native int pthread_attr_getinheritsched(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Integer > intPtr1); |
| 97 | + public static native int pthread_attr_getschedparam(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<PthreadLibrary.sched_param > sched_paramPtr1); |
| 98 | + public static native int pthread_attr_getschedpolicy(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Integer > intPtr1); |
| 99 | + public static native int pthread_attr_getscope(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Integer > intPtr1); |
| 100 | + public static native int pthread_attr_getstack(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Pointer<? > > voidPtrPtr1, Pointer<SizeT > size_tPtr1); |
| 101 | + public static native int pthread_attr_getstackaddr(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<Pointer<? > > voidPtrPtr1); |
| 102 | + public static native int pthread_attr_getstacksize(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<SizeT > size_tPtr1); |
| 103 | + public static native int pthread_attr_init(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1); |
| 104 | + public static native int pthread_attr_setdetachstate(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, int int1); |
| 105 | + public static native int pthread_attr_setguardsize(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, @Ptr long size_t1); |
| 106 | + public static native int pthread_attr_setinheritsched(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, int int1); |
| 107 | + public static native int pthread_attr_setschedparam(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<PthreadLibrary.sched_param > sched_paramPtr1); |
| 108 | + public static native int pthread_attr_setschedpolicy(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, int int1); |
| 109 | + public static native int pthread_attr_setscope(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, int int1); |
| 110 | + public static native int pthread_attr_setstack(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<? > voidPtr1, @Ptr long size_t1); |
| 111 | + public static native int pthread_attr_setstackaddr(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<? > voidPtr1); |
| 112 | + public static native int pthread_attr_setstacksize(Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, @Ptr long size_t1); |
| 113 | + public static native int pthread_cancel(); |
| 114 | + public static native int pthread_cond_broadcast(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1); |
| 115 | + public static native int pthread_cond_destroy(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1); |
| 116 | + public static native int pthread_cond_init(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1, Pointer<PthreadLibrary._opaque_pthread_condattr_t > pthread_condattr_tPtr1); |
| 117 | + public static native int pthread_cond_signal(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1); |
| 118 | + public static native int pthread_cond_timedwait(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1, Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1, Pointer<PthreadLibrary.timespec > timespecPtr1); |
| 119 | + public static native int pthread_cond_wait(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1, Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1); |
| 120 | + public static native int pthread_condattr_destroy(Pointer<PthreadLibrary._opaque_pthread_condattr_t > pthread_condattr_tPtr1); |
| 121 | + public static native int pthread_condattr_init(Pointer<PthreadLibrary._opaque_pthread_condattr_t > pthread_condattr_tPtr1); |
| 122 | + public static native int pthread_condattr_getpshared(Pointer<PthreadLibrary._opaque_pthread_condattr_t > pthread_condattr_tPtr1, Pointer<Integer > intPtr1); |
| 123 | + public static native int pthread_condattr_setpshared(Pointer<PthreadLibrary._opaque_pthread_condattr_t > pthread_condattr_tPtr1, int int1); |
| 124 | + public static native int pthread_create(Pointer<Pointer<PthreadLibrary._opaque_pthread_t > > pthread_tPtr1, Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<PthreadLibrary.pthread_create_arg1_callback > arg1, Pointer<? > voidPtr1); |
| 125 | + public static native int pthread_detach(); |
| 126 | + public static native int pthread_equal(); |
| 127 | + public static native void pthread_exit(Pointer<? > voidPtr1); |
| 128 | + public static native int pthread_getconcurrency(); |
| 129 | + public static native int pthread_getschedparam(Pointer<Integer > intPtr1, Pointer<PthreadLibrary.sched_param > sched_paramPtr1); |
| 130 | + public static native Pointer<? > pthread_getspecific(); |
| 131 | + public static native int pthread_join(Pointer<Pointer<? > > voidPtrPtr1); |
| 132 | + public static native int pthread_key_create(Pointer<SizeT > pthread_key_tPtr1, Pointer<PthreadLibrary.pthread_key_create_arg1_callback > arg1); |
| 133 | + public static native int pthread_key_delete(); |
| 134 | + public static native int pthread_mutex_destroy(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1); |
| 135 | + public static native int pthread_mutex_getprioceiling(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1, Pointer<Integer > intPtr1); |
| 136 | + public static native int pthread_mutex_init(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1, Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1); |
| 137 | + public static native int pthread_mutex_lock(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1); |
| 138 | + public static native int pthread_mutex_setprioceiling(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1, int int1, Pointer<Integer > intPtr1); |
| 139 | + public static native int pthread_mutex_trylock(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1); |
| 140 | + public static native int pthread_mutex_unlock(Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1); |
| 141 | + public static native int pthread_mutexattr_destroy(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1); |
| 142 | + public static native int pthread_mutexattr_getprioceiling(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, Pointer<Integer > intPtr1); |
| 143 | + public static native int pthread_mutexattr_getprotocol(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, Pointer<Integer > intPtr1); |
| 144 | + public static native int pthread_mutexattr_getpshared(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, Pointer<Integer > intPtr1); |
| 145 | + public static native int pthread_mutexattr_gettype(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, Pointer<Integer > intPtr1); |
| 146 | + public static native int pthread_mutexattr_init(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1); |
| 147 | + public static native int pthread_mutexattr_setprioceiling(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, int int1); |
| 148 | + public static native int pthread_mutexattr_setprotocol(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, int int1); |
| 149 | + public static native int pthread_mutexattr_setpshared(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, int int1); |
| 150 | + public static native int pthread_mutexattr_settype(Pointer<PthreadLibrary._opaque_pthread_mutexattr_t > pthread_mutexattr_tPtr1, int int1); |
| 151 | + public static native int pthread_once(Pointer<PthreadLibrary._opaque_pthread_once_t > pthread_once_tPtr1, Pointer<PthreadLibrary.pthread_once_arg1_callback > arg1); |
| 152 | + public static native int pthread_rwlock_destroy(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 153 | + public static native int pthread_rwlock_init(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1, Pointer<PthreadLibrary._opaque_pthread_rwlockattr_t > pthread_rwlockattr_tPtr1); |
| 154 | + public static native int pthread_rwlock_rdlock(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 155 | + public static native int pthread_rwlock_tryrdlock(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 156 | + public static native int pthread_rwlock_trywrlock(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 157 | + public static native int pthread_rwlock_wrlock(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 158 | + public static native int pthread_rwlock_unlock(Pointer<PthreadLibrary._opaque_pthread_rwlock_t > pthread_rwlock_tPtr1); |
| 159 | + public static native int pthread_rwlockattr_destroy(Pointer<PthreadLibrary._opaque_pthread_rwlockattr_t > pthread_rwlockattr_tPtr1); |
| 160 | + public static native int pthread_rwlockattr_getpshared(Pointer<PthreadLibrary._opaque_pthread_rwlockattr_t > pthread_rwlockattr_tPtr1, Pointer<Integer > intPtr1); |
| 161 | + public static native int pthread_rwlockattr_init(Pointer<PthreadLibrary._opaque_pthread_rwlockattr_t > pthread_rwlockattr_tPtr1); |
| 162 | + public static native int pthread_rwlockattr_setpshared(Pointer<PthreadLibrary._opaque_pthread_rwlockattr_t > pthread_rwlockattr_tPtr1, int int1); |
| 163 | + public static native PthreadLibrary.pthread_t pthread_self(); |
| 164 | + public static native int pthread_setcancelstate(int int1, Pointer<Integer > intPtr1); |
| 165 | + public static native int pthread_setcanceltype(int int1, Pointer<Integer > intPtr1); |
| 166 | + public static native int pthread_setconcurrency(int int1); |
| 167 | + public static native int pthread_setschedparam(int int1, Pointer<PthreadLibrary.sched_param > sched_paramPtr1); |
| 168 | + public static native int pthread_setspecific(Pointer<? > voidPtr1); |
| 169 | + public static native void pthread_testcancel(); |
| 170 | + public static native int pthread_is_threaded_np(); |
| 171 | + public static native int pthread_threadid_np(Pointer<Long > __uint64_tPtr1); |
| 172 | + public static native int pthread_getname_np(Pointer<Byte > charPtr1, @Ptr long size_t1); |
| 173 | + public static native int pthread_setname_np(Pointer<Byte > charPtr1); |
| 174 | + public static native int pthread_main_np(); |
| 175 | + public static native int pthread_mach_thread_np(); |
| 176 | + @Ptr |
| 177 | + public static native long pthread_get_stacksize_np(); |
| 178 | + public static native Pointer<? > pthread_get_stackaddr_np(); |
| 179 | + public static native int pthread_cond_signal_thread_np(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1); |
| 180 | + public static native int pthread_cond_timedwait_relative_np(Pointer<PthreadLibrary._opaque_pthread_cond_t > pthread_cond_tPtr1, Pointer<PthreadLibrary._opaque_pthread_mutex_t > pthread_mutex_tPtr1, Pointer<PthreadLibrary.timespec > timespecPtr1); |
| 181 | + public static native int pthread_create_suspended_np(Pointer<Pointer<PthreadLibrary._opaque_pthread_t > > pthread_tPtr1, Pointer<PthreadLibrary._opaque_pthread_attr_t > pthread_attr_tPtr1, Pointer<PthreadLibrary.pthread_create_suspended_np_arg1_callback > arg1, Pointer<? > voidPtr1); |
| 182 | + public static native int pthread_kill(int int1); |
| 183 | + public static native PthreadLibrary.pthread_t pthread_from_mach_thread_np(); |
| 184 | + public static native int pthread_sigmask(int int1, Pointer<Integer > sigset_tPtr1, Pointer<Integer > sigset_tPtr2); |
| 185 | + public static native void pthread_yield_np(); |
| 186 | + /// Undefined type |
| 187 | + public static interface _opaque_pthread_condattr_t { |
| 188 | + |
| 189 | + }; |
| 190 | + /// Undefined type |
| 191 | + public static interface sched_param { |
| 192 | + |
| 193 | + }; |
| 194 | + /// Undefined type |
| 195 | + public static interface _opaque_pthread_attr_t { |
| 196 | + |
| 197 | + }; |
| 198 | + /// Undefined type |
| 199 | + public static interface _opaque_pthread_rwlock_t { |
| 200 | + |
| 201 | + }; |
| 202 | + /// Undefined type |
| 203 | + public static interface _opaque_pthread_rwlockattr_t { |
| 204 | + |
| 205 | + }; |
| 206 | + /// Undefined type |
| 207 | + public static interface _opaque_pthread_cond_t { |
| 208 | + |
| 209 | + }; |
| 210 | + /// Undefined type |
| 211 | + public static interface _opaque_pthread_t { |
| 212 | + |
| 213 | + }; |
| 214 | + /// Undefined type |
| 215 | + public static interface timespec { |
| 216 | + |
| 217 | + }; |
| 218 | + /// Undefined type |
| 219 | + public static interface _opaque_pthread_once_t { |
| 220 | + |
| 221 | + }; |
| 222 | + /// Undefined type |
| 223 | + public static interface _opaque_pthread_mutexattr_t { |
| 224 | + |
| 225 | + }; |
| 226 | + /// Undefined type |
| 227 | + public static interface _opaque_pthread_mutex_t { |
| 228 | + |
| 229 | + }; |
| 230 | + /// Pointer to unknown (opaque) type |
| 231 | + public static class pthread_t extends TypedPointer { |
| 232 | + public pthread_t(long address) { |
| 233 | + super(address); |
| 234 | + } |
| 235 | + public pthread_t(Pointer address) { |
| 236 | + super(address); |
| 237 | + } |
| 238 | + }; |
| 239 | +} |
0 commit comments