1CURLSHOPT_UNLOCKFUNC(3)             libcurl            CURLSHOPT_UNLOCKFUNC(3)
2
3
4

NAME

6       CURLSHOPT_UNLOCKFUNC - mutex unlock callback
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       void unlockcb(CURL *handle, curl_lock_data data, void *clientp);
12
13       CURLSHcode curl_share_setopt(CURLSH *share, CURLSHOPT_UNLOCKFUNC, unlockcb);
14

DESCRIPTION

16       Set a mutex unlock callback for the share object. There's a correspond‐
17       ing CURLSHOPT_LOCKFUNC(3) callback  called  when  the  mutex  is  first
18       locked.
19
20       The unlockcb argument must be a pointer to a function matching the pro‐
21       totype shown above. The arguments to the callback are:
22
23       handle is the currently active easy handle in use when the share object
24       is released.
25
26       The data argument tells what kind of data libcurl wants to unlock. Make
27       sure that the callback uses a different lock for each kind of data.
28
29       clientp is the private pointer you set with  CURLSHOPT_USERDATA.   This
30       pointer is not used by libcurl itself.
31

PROTOCOLS

33       All
34

EXAMPLE

36         CURLSHcode sh;
37         share = curl_share_init();
38         sh = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, mutex_unlock);
39         if(sh)
40           printf("Error: %s\n", curl_share_strerror(sh));
41

AVAILABILITY

43       Added in 7.10
44

RETURN VALUE

46       CURLSHE_OK  (zero)  means  that  the  option was set properly, non-zero
47       means an error occurred. See libcurl-errors(3) for the full  list  with
48       descriptions.
49

SEE ALSO

51       CURLSHOPT_LOCKFUNC(3),   curl_share_setopt(3),   curl_share_cleanup(3),
52       curl_share_init(3)
53
54
55
56ibcurl 8.2.1                    April 26, 2023         CURLSHOPT_UNLOCKFUNC(3)
Impressum