[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


pthread_key_delete Subroutine

Purpose

Deletes a thread-specific data key.

Library

Threads Library (libpthreads.a)

Syntax

#include <pthread.h>


int pthread_key_delete (pthread_key_t key);

Description

The pthread_key_delete subroutine deletes the thread-specific data key key, previously created with the pthread_key_create subroutine. The application must ensure that no thread-specific data is associated with the key. No destructor routine is called.

Note: The pthread.h header file must be the first included file of each source file using the threads library. Otherwise, the -D_THREAD_SAFE compilation flag should be used, or the cc_r compiler used. In this case, the flag is automatically set.

Parameters


key Specifies the key to delete.

Return Values

If successful, the pthread_key_delete function returns zero. Otherwise, an error number is returned to indicate the error.

Error Codes

The pthread_key_delete function will fail if:

EINVAL The key value is invalid.

The pthread_key_delete function will not return an error code of EINTR.

Implementation Specifics

This subroutine is part of the Base Operating System (BOS) Runtime.

Related Information

The pthread_key_create (pthread_key_create Subroutine) subroutine, pthread.h file.

Thread-Specific Data in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

Threads Library Quick Reference in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]