Bit | Meaning |
---|---|
0 | Reserved, should be set to 0 |
1 | Reserved, should be set to 0 |
2 | 0: Allocate a thread-storage handle. The handle is not independent of the calling program, and is deallocated automatically when the calling program is canceled. 1: Allocate a thread-storage handle that is independent from any calling program. If this bit is set the thread-storage handle will be closed at the end of the run-unit |
3-31 | Reserved, should be set to 0 |
Comments:
CBL_TSTORE_CREATE specifies the size of the memory block that will be returned by any subsequent calls to CBL_TSTORE_GET and, optionally, associates that handle with the calling program so that when the calling program is canceled the returned handle is automatically closed. In any event the returned handle will be closed at termination of the run-unit or a call to CBL_TSTORE_CLOSE, whichever comes first.
If this thread-storage handle is not associated with a program, then the thread-storage handle is closed at the end of the run-unit.
You should ensure that this routine is called in single-threaded mode by forcing single-threaded behavior within a monitor lock, or by calling it only when initializing the application in single-threaded mode.