Updated wrappers

This commit is contained in:
Robert Osfield
2009-02-11 20:02:45 +00:00
parent b4e0acc7b3
commit 957708b4be
211 changed files with 973 additions and 3861 deletions

View File

@@ -40,6 +40,34 @@ END_REFLECTOR
BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread)
I_DeclaringFile("OpenThreads/Thread");
I_StaticMethod1(int, SetConcurrency, IN, int, concurrencyLevel,
__int__SetConcurrency__int_S,
"Set the concurrency level for a running application. ",
"This method only has effect if the pthreads thread model is being used, and then only when that model is many-to-one (eg. irix). in other cases it is ignored. The concurrency level is only a *hint* as to the number of execution vehicles to use, the actual implementation may do anything it wants. Setting the value to 0 returns things to their default state.previous concurrency level, -1 indicates no-op. ");
I_StaticMethod0(int, GetConcurrency,
__int__GetConcurrency_S,
"Get the concurrency level for a running application. ",
"In this case, a return code of 0 means that the application is in default mode. A return code of -1 means that the application is incapable of setting an arbitrary concurrency, because it is a one-to-one execution model (sprocs, linuxThreads) ");
I_StaticMethod0(OpenThreads::Thread *, CurrentThread,
__Thread_P1__CurrentThread_S,
"Return a pointer to the current running thread. ",
"");
I_StaticMethod0(void, Init,
__void__Init_S,
"Initialize Threading in a program. ",
"This method must be called before you can do any threading in a program. ");
I_StaticMethod0(int, YieldCurrentThread,
__int__YieldCurrentThread_S,
"Yield the processor. ",
"This method operates on the calling process. And is equivalent to calling sched_yield(). 0 if normal, -1 if errno set, errno code otherwise. ");
I_StaticMethod0(OpenThreads::Thread::ThreadPriority, GetMasterPriority,
__ThreadPriority__GetMasterPriority_S,
"This method will return the ThreadPriority of the master process. ",
"(ie, the one calling the thread->start() methods for the first time) The method will almost certainly return Thread::THREAD_PRIORITY_DEFAULT if Init() has not been called.the Thread::ThreadPriority of the master thread. ");
I_StaticMethod1(int, microSleep, IN, unsigned int, microsec,
__int__microSleep__unsigned_int_S,
"microSleep method, equivilant to the posix usleep(microsec). ",
"This is not strictly thread API but is used so often with threads. It's basically UNIX usleep. Parameter is number of microseconds we current thread to sleep. Returns 0 on succes, non-zero on failure (UNIX errno or GetLastError() will give detailed description. ");
I_Constructor0(____Thread,
"Constructor. ",
"");
@@ -158,34 +186,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(OpenThreads::Thread)
__int__setProcessorAffinity__unsigned_int,
"Thread's processor affinity method. ",
"This binds a thread to a processor whenever possible. This call must be made before start() or startThread() and has no effect after the thread has been running. In the pthreads implementation, this is only implemented on sgi, through a pthread extension. On other pthread platforms this is ignored. Returns 0 on success, implementation's error on failure, or -1 if ignored. ");
I_StaticMethod1(int, SetConcurrency, IN, int, concurrencyLevel,
__int__SetConcurrency__int_S,
"Set the concurrency level for a running application. ",
"This method only has effect if the pthreads thread model is being used, and then only when that model is many-to-one (eg. irix). in other cases it is ignored. The concurrency level is only a *hint* as to the number of execution vehicles to use, the actual implementation may do anything it wants. Setting the value to 0 returns things to their default state.previous concurrency level, -1 indicates no-op. ");
I_StaticMethod0(int, GetConcurrency,
__int__GetConcurrency_S,
"Get the concurrency level for a running application. ",
"In this case, a return code of 0 means that the application is in default mode. A return code of -1 means that the application is incapable of setting an arbitrary concurrency, because it is a one-to-one execution model (sprocs, linuxThreads) ");
I_StaticMethod0(OpenThreads::Thread *, CurrentThread,
__Thread_P1__CurrentThread_S,
"Return a pointer to the current running thread. ",
"");
I_StaticMethod0(void, Init,
__void__Init_S,
"Initialize Threading in a program. ",
"This method must be called before you can do any threading in a program. ");
I_StaticMethod0(int, YieldCurrentThread,
__int__YieldCurrentThread_S,
"Yield the processor. ",
"This method operates on the calling process. And is equivalent to calling sched_yield(). 0 if normal, -1 if errno set, errno code otherwise. ");
I_StaticMethod0(OpenThreads::Thread::ThreadPriority, GetMasterPriority,
__ThreadPriority__GetMasterPriority_S,
"This method will return the ThreadPriority of the master process. ",
"(ie, the one calling the thread->start() methods for the first time) The method will almost certainly return Thread::THREAD_PRIORITY_DEFAULT if Init() has not been called.the Thread::ThreadPriority of the master thread. ");
I_StaticMethod1(int, microSleep, IN, unsigned int, microsec,
__int__microSleep__unsigned_int_S,
"microSleep method, equivilant to the posix usleep(microsec). ",
"This is not strictly thread API but is used so often with threads. It's basically UNIX usleep. Parameter is number of microseconds we current thread to sleep. Returns 0 on succes, non-zero on failure (UNIX errno or GetLastError() will give detailed description. ");
I_SimpleProperty(void *, Implementation,
__void_P1__getImplementation,
0);