C library interface: pthread_key_create()
CEEOPKC creates a new unique key in the enclave of the caller and in the context of the current enclave. The destructor is a pointer to a function to be executed upon thread termination. The CEEOPKC service assigns a key identifier and returns it in the location referred to by key. Key identifiers and their associated destructor functions are common to all threads in the enclave.
CEE_THDKEY *key;
CEE_ENTRY *destructor;
FEED_BACK *fc;
L R15,CEECAALEOV-CEECAA(,R12) CAA address is in R12
L R15,0092(,R15)
BALR R14,R15
The following message identifiers and associated severities can be returned by the service in the feedback code fc.
Condition | ||
---|---|---|
CEE000 | Severity | 0 |
Msg_No | 0000 | |
Message | The service completed successfully. | |
CEE4S9 | Severity | 3 |
Msg_No | 5001 | |
Message | POSIX is not initialized. | |
CEE5CM | Severity | 3 |
Msg_No | 5526 | |
Message | There was not enough storage available to create the new key. | |
CEE5CN | Severity | 3 |
Msg_No | 5527 | |
Message | The key name space is exhausted. The key creation would have resulted in more than the system imposed limit for the maximum number of data keys which can be created per enclave. | |
CEE5CO | Severity | 3 |
Msg_No | 5528 | |
Message | Thread termination is in progress. This operation is not allowed. Key creation is not permitted during thread termination. | |
CEE5CT | Severity | 3 |
Msg_No | 5533 | |
Message | The key pointer passed is not valid. |