ReactOS  0.4.13-dev-656-g74bcf30
mt_misc.c File Reference
#include <wintirpc.h>
#include <reentrant.h>
#include <rpc/rpc.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for mt_misc.c:

Go to the source code of this file.

Functions

struct rpc_createerr__rpc_createerr ()
 
void tsd_key_delete (void)
 

Variables

rwlock_t svc_lock
 
rwlock_t svc_fd_lock
 
rwlock_t rpcbaddr_cache_lock
 
mutex_t authdes_lock
 
mutex_t authdes_ops_lock
 
mutex_t svcauthdesstats_lock
 
mutex_t authnone_lock
 
mutex_t authsvc_lock
 
mutex_t clnt_fd_lock
 
mutex_t clntraw_lock
 
mutex_t dname_lock
 
mutex_t dupreq_lock
 
mutex_t keyserv_lock
 
mutex_t libnsl_trace_lock
 
mutex_t loopnconf_lock
 
mutex_t ops_lock
 
mutex_t portnum_lock
 
mutex_t proglst_lock
 
mutex_t rpcsoc_lock
 
mutex_t svcraw_lock
 
mutex_t tsd_lock
 
thread_key_t clnt_broadcast_key
 
thread_key_t rpc_call_key = -1
 
thread_key_t tcp_key = -1
 
thread_key_t udp_key = -1
 
thread_key_t nc_key = -1
 
thread_key_t rce_key = -1
 
mutex_t xprtlist_lock
 
mutex_t serialize_pkey
 
mutex_t nc_lock
 
struct rpc_createerr rpc_createerr
 

Function Documentation

◆ __rpc_createerr()

struct rpc_createerr* __rpc_createerr ( void  )

Definition at line 140 of file mt_misc.c.

141 {
142  struct rpc_createerr *rce_addr;
143 
145  if (rce_key == -1)
146  rce_key = TlsAlloc(); //thr_keycreate(&rce_key, free);
148 
149  rce_addr = (struct rpc_createerr *)thr_getspecific(rce_key);
150  if (!rce_addr) {
151  rce_addr = (struct rpc_createerr *)
152  malloc(sizeof (struct rpc_createerr));
153  if (!rce_addr ||
154  thr_setspecific(rce_key, (void *) rce_addr) == 0) {
155  if (rce_addr)
156  free(rce_addr);
157  return (&rpc_createerr);
158  }
159  memset(rce_addr, 0, sizeof (struct rpc_createerr));
160  }
161  return (rce_addr);
162 }
#define thr_setspecific(k, p)
Definition: reentrant.h:146
#define free
Definition: debug_ros.c:5
thread_key_t rce_key
Definition: mt_misc.c:94
#define mutex_lock(m)
Definition: reentrant.h:128
#define mutex_unlock(m)
Definition: reentrant.h:129
mutex_t tsd_lock
Definition: mt_misc.c:86
#define thr_getspecific(k)
Definition: reentrant.h:147
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1050
#define malloc
Definition: debug_ros.c:4
#define memset(x, y, z)
Definition: compat.h:39

◆ tsd_key_delete()

void tsd_key_delete ( void  )

Definition at line 164 of file mt_misc.c.

165 {
166  if (clnt_broadcast_key != -1)
168  if (rpc_call_key != -1)
170  if (tcp_key != -1)
172  if (udp_key != -1)
174  if (nc_key != -1)
176  if (rce_key != -1)
178  return;
179 }
thread_key_t clnt_broadcast_key
Definition: mt_misc.c:89
thread_key_t tcp_key
Definition: mt_misc.c:91
thread_key_t rpc_call_key
Definition: mt_misc.c:90
#define thr_keydelete(k)
Definition: reentrant.h:145
thread_key_t rce_key
Definition: mt_misc.c:94
thread_key_t udp_key
Definition: mt_misc.c:92
thread_key_t nc_key
Definition: mt_misc.c:93

Variable Documentation

◆ authdes_lock

mutex_t authdes_lock

Definition at line 28 of file mt_misc.c.

◆ authdes_ops_lock

mutex_t authdes_ops_lock

Definition at line 31 of file mt_misc.c.

Referenced by authdes_ops().

◆ authnone_lock

mutex_t authnone_lock

Definition at line 44 of file mt_misc.c.

Referenced by authnone_create(), and authnone_marshal().

◆ authsvc_lock

mutex_t authsvc_lock

Definition at line 47 of file mt_misc.c.

Referenced by _authenticate(), and svc_auth_reg().

◆ clnt_broadcast_key

thread_key_t clnt_broadcast_key

Definition at line 89 of file mt_misc.c.

Referenced by tsd_key_delete().

◆ clnt_fd_lock

◆ clntraw_lock

mutex_t clntraw_lock

Definition at line 53 of file mt_misc.c.

Referenced by clnt_raw_create(), and clnt_raw_freeres().

◆ dname_lock

mutex_t dname_lock

Definition at line 56 of file mt_misc.c.

◆ dupreq_lock

mutex_t dupreq_lock

Definition at line 59 of file mt_misc.c.

Referenced by cache_get(), cache_set(), and svc_dg_enablecache().

◆ keyserv_lock

mutex_t keyserv_lock

Definition at line 62 of file mt_misc.c.

◆ libnsl_trace_lock

mutex_t libnsl_trace_lock

Definition at line 65 of file mt_misc.c.

◆ loopnconf_lock

mutex_t loopnconf_lock

Definition at line 68 of file mt_misc.c.

Referenced by local_rpcb().

◆ nc_key

thread_key_t nc_key = -1

Definition at line 93 of file mt_misc.c.

Referenced by __nc_error(), and tsd_key_delete().

◆ nc_lock

mutex_t nc_lock

Definition at line 103 of file mt_misc.c.

Referenced by __nc_error().

◆ ops_lock

◆ portnum_lock

mutex_t portnum_lock

Definition at line 74 of file mt_misc.c.

◆ proglst_lock

mutex_t proglst_lock

Definition at line 77 of file mt_misc.c.

Referenced by rpc_reg(), and universal().

◆ rce_key

thread_key_t rce_key = -1

Definition at line 94 of file mt_misc.c.

Referenced by __rpc_createerr(), and tsd_key_delete().

◆ rpc_call_key

thread_key_t rpc_call_key = -1

Definition at line 90 of file mt_misc.c.

Referenced by rpc_call(), and tsd_key_delete().

◆ rpc_createerr

Definition at line 137 of file mt_misc.c.

◆ rpcbaddr_cache_lock

rwlock_t rpcbaddr_cache_lock

Definition at line 25 of file mt_misc.c.

Referenced by add_cache(), and getclnthandle().

◆ rpcsoc_lock

mutex_t rpcsoc_lock

Definition at line 80 of file mt_misc.c.

◆ serialize_pkey

mutex_t serialize_pkey

Definition at line 100 of file mt_misc.c.

◆ svc_fd_lock

◆ svc_lock

rwlock_t svc_lock

Definition at line 19 of file mt_misc.c.

Referenced by svc_reg(), and svc_unreg().

◆ svcauthdesstats_lock

mutex_t svcauthdesstats_lock

Definition at line 34 of file mt_misc.c.

◆ svcraw_lock

mutex_t svcraw_lock

◆ tcp_key

thread_key_t tcp_key = -1

Definition at line 91 of file mt_misc.c.

Referenced by __rpc_getconfip(), and tsd_key_delete().

◆ tsd_lock

mutex_t tsd_lock

Definition at line 86 of file mt_misc.c.

Referenced by __rpc_createerr(), __rpc_getconfip(), getkeyserv_handle(), and rpc_call().

◆ udp_key

thread_key_t udp_key = -1

Definition at line 92 of file mt_misc.c.

Referenced by __rpc_getconfip(), and tsd_key_delete().

◆ xprtlist_lock

mutex_t xprtlist_lock

Definition at line 97 of file mt_misc.c.

Referenced by svc_create().