1pthread_key_delete(3C)   Standard C Library Functions   pthread_key_delete(3C)
2
3
4

NAME

6       pthread_key_delete - delete thread-specific data key
7

SYNOPSIS

9       cc -mt [ flag... ] file... -lpthread [ library... ]
10       #include <pthread.h>
11
12       int pthread_key_delete(pthread_key_t key);
13
14

DESCRIPTION

16       The  pthread_key_delete()  function  deletes a thread-specific data key
17       previously returned by pthread_key_create(). The  thread-specific  data
18       values   associated   with   key   need   not  be   NULL  at  the  time
19       pthread_key_delete() is called. It is the responsibility of the  appli‐
20       cation  to  free any application storage or perform any cleanup actions
21       for data structures related to the deleted key  or  associated  thread-
22       specific data in any threads; this cleanup can be done either before or
23       after pthread_key_delete() is called. Any attempt to use key  following
24       the call to pthread_key_delete() results in undefined behaviour.
25
26
27       The  pthread_key_delete()  function  is callable from within destructor
28       functions.   No   destructor   functions    will    be    invoked    by
29       pthread_key_delete().  Any destructor function that may have been asso‐
30       ciated with key will no longer be called upon thread exit.
31

RETURN VALUES

33       If successful, the pthread_key_delete() function returns  0. Otherwise,
34       an error number is returned to indicate the error.
35

ERRORS

37       The pthread_key_delete() function may fail if:
38
39       EINVAL    The key value is invalid.
40
41
42
43       The  pthread_key_delete()  function  will  not  return an error code of
44       EINTR.
45

ATTRIBUTES

47       See attributes(5) for descriptions of the following attributes:
48
49
50
51
52       ┌─────────────────────────────┬─────────────────────────────┐
53       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
54       ├─────────────────────────────┼─────────────────────────────┤
55       │Interface Stability          │Standard                     │
56       ├─────────────────────────────┼─────────────────────────────┤
57       │MT-Level                     │MT-Safe                      │
58       └─────────────────────────────┴─────────────────────────────┘
59

SEE ALSO

61       pthread_key_create(3C), attributes(5), standards(5)
62
63
64
65SunOS 5.11                        23 Mar 2005           pthread_key_delete(3C)
Impressum