Group PJ_TLS

group PJ_TLS

Functions

pj_status_t pj_thread_local_alloc(long *index)

Allocate thread local storage index. The initial value of the variable at the index is zero.

Parameters

index – Pointer to hold the return value.

Returns

PJ_SUCCESS on success, or the error code.

void pj_thread_local_free(long index)

Deallocate thread local variable.

Parameters

index – The variable index.

pj_status_t pj_thread_local_set(long index, void *value)

Set the value of thread local variable.

Parameters
  • index – The index of the variable.

  • value – The value.

void *pj_thread_local_get(long index)

Get the value of thread local variable.

Parameters

index – The index of the variable.

Returns

The value.