The following values are provided as RETURN-CODE values from the synchronization routines:
0 | No error was encountered. |
1000 | Memory allocation error. |
1001 | The thread is invalid. The handle is not a valid handle for the synchronization object, and no operations are valid on it. It is possible that the handle specified was once valid but it has been closed and memory reused. |
1002 | The thread has been closed. No operations are valid on this handle. The handle was once valid but has since been closed. |
1003 | The thread is detached. CBL_THREAD_DETACH cannot detach the thread since it has already been detached. CBL_THREAD_WAIT cannot wait on the thread since it has already been detached. |
1004 | Too many threads. CBL_THREAD_CREATE cannot create another thread since too many threads exist in the system already. |
1005 | The stack size is invalid. CBL_THREAD_CREATE cannot create this thread as the operating system will not allow the provided stack size to be used. |
1006 | Invalid operation. CBL_THREAD_CREATE cannot create a thread while the system is deinitializing.
or: An invalid thread-control routine was attempted on a thread that was not created with CBL_THREAD_CREATE.or: CBL_THREAD_PROG_LOCK was not called directly or indirectly from a COBOL program. |
1007 | A system error was encountered. The last operation caused a system error in low level object manipulation. |
1008 | Threading not supported in this run-time system. A threaded application attempted to use a multi-threading routine while running with a non-threaded run-time system. |
1009 | Invalid parameter passed into a multi-threading library routine. A parameter has been detected that is not within the valid range, or that is inconsistent with the library routine. |
1010 | No resources available. A semaphore or mutex cannot be acquired because its count is zero and the user requested no automatic wait.
or: An event is not posted and the user has no wait on the CBL_EVENT_WAIT call. |
1011 | Program or entry-point name not found. The program or entry-point name specified to CBL_THREAD_CREATE was not found, or there was an error loading it. |