Thread return codes <errcode.h>

Top  Previous  Next

Every Diamond thread maintains information that can be used externally to determine error conditions or other status. The information is held in a structure of the following format:

 

typedef struct {

   unsigned int  code;

   const char   *text;

   unsigned int  v1;

   unsigned int  v2;

} errcode_t;

 

The meanings of the fields are not pre-defined; you can use them for any purposes you wish. The type ERRCODE is defined to be a pointer to an errcode_t structure.

 

The following functions are provided:

 


errcode_get

return a pointer to the errcode_t structure of a thread


errcode_see

convert an errcode_t structure into a textual format


errcode_set

set values into the current thread’s errcode_t structure.