• Home
  • Raw
  • Download

Lines Matching +full:unused +full:- +full:function

8  * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
28 /* For native LibC-based NLM we need to register as a real lib. */
51 NXKey_t perthreadkey; /* if -1, no key obtained... */
55 int gLibId = -1;
60 /* internal library function prototypes... */
82 NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0); in _NonAppStart()
85 #pragma unused(cmdLine) in _NonAppStart()
86 #pragma unused(loadDirPath) in _NonAppStart()
87 #pragma unused(uninitializedDataLength) in _NonAppStart()
88 #pragma unused(NLMFileHandle) in _NonAppStart()
89 #pragma unused(readRoutineP) in _NonAppStart()
90 #pragma unused(customDataOffset) in _NonAppStart()
91 #pragma unused(customDataSize) in _NonAppStart()
92 #pragma unused(messageCount) in _NonAppStart()
93 #pragma unused(messages) in _NonAppStart()
99 * to accept calls into us. If we succeed, we return non-zero and the NetWare in _NonAppStart()
103 "<library-name> memory allocations", in _NonAppStart()
109 return -1; in _NonAppStart()
114 if(gLibId < -1) { in _NonAppStart()
116 return -1; in _NonAppStart()
125 return -1; in _NonAppStart()
142 * This function cannot be the first in the file for if the file is linked
143 * first, then the check-unload function's offset will be nlmname.nlm+0
144 * which is how to tell that there isn't one. When the check function is
146 * put it inside this file after the stop function.
149 * we return a non-zero value. Right now, there isn't any reason not to allow
171 * store whatever application-specific information we need to carry in in GetOrSetUpData()
179 * per-thread data. Of course, just in case a thread from this same in GetOrSetUpData()
181 * data-creation mutex. We also need to recheck for data after we acquire in GetOrSetUpData()
192 app_data->tenbytes = malloc(10); in GetOrSetUpData()
193 app_data->lock = NXMutexAlloc(0, 0, &liblock); in GetOrSetUpData()
195 if(!app_data->tenbytes || !app_data->lock) { in GetOrSetUpData()
196 if(app_data->lock) in GetOrSetUpData()
197 NXMutexFree(app_data->lock); in GetOrSetUpData()
198 free(app_data->tenbytes); in GetOrSetUpData()
207 * by calling get_app_data(). Next time we call the first function, in GetOrSetUpData()
209 * establish the per-thread data for the calling thread, something in GetOrSetUpData()
216 if(app_data->lock) in GetOrSetUpData()
217 NXMutexFree(app_data->lock); in GetOrSetUpData()
218 free(app_data->tenbytes); in GetOrSetUpData()
224 /* create key for thread-specific data... */ in GetOrSetUpData()
228 key = -1; in GetOrSetUpData()
230 app_data->perthreadkey = key; in GetOrSetUpData()
240 key = app_data->perthreadkey; in GetOrSetUpData()
242 if(key != -1 /* couldn't create a key? no thread data */ in GetOrSetUpData()
246 * Allocate the per-thread data for the calling thread. Regardless of in GetOrSetUpData()
250 * we can have arbitrarily complex per-thread data. in GetOrSetUpData()
255 thread_data->_errno = 0; in GetOrSetUpData()
256 thread_data->twentybytes = malloc(20); in GetOrSetUpData()
258 if(!thread_data->twentybytes) { in GetOrSetUpData()
266 free(thread_data->twentybytes); in GetOrSetUpData()
286 void *tenbytes = ((libdata_t *) data)->tenbytes; in DisposeLibraryData()
298 void *twentybytes = ((libthreaddata_t *) data)->twentybytes; in DisposeThreadData()
306 /* For native CLib-based NLM seems we can do a bit more simple. */