mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-11 03:10:40 +03:00
locking: Simplify maintenance / debugging /documentation
Update the Public API equivalent of the libcoap functions that need to be called when locked with a name suffix of _lkd. Move matching Public API functions out of coap_threadsafe.c to be coded just ahead of the newly renamed _lkd function. Properly define the _lkd function in the appropriate _internal.h file for documentation, removing the #defines from coap_threadsafe_internal.h. Tag all the Public API functions that have a _lkd function with COAP_API. COAP_API can then be defined as to what should be done for that function. Check libcoap library does not call the original Public API function when it should be calling the _lkd function by marking the Public API not _lkd functions as deprecated during the libcoap library build. [Done by the new COAP_API being defined as __attribute__((deprecated)).] Work in progress for all the functions that need to be multi-thread safe.
This commit is contained in:
1 parent
948697e4b2
commit
cb20c482b2
37 files changed
+1140
-911
No files matched your search
@@ -12,17 +12,6 @@
|
||||
|
||||
#include "coap_config.h"
|
||||
|
||||
#if COAP_THREAD_SAFE
|
||||
/*
|
||||
* Unfortunately, this needs to be set so that locking mapping of coap_
|
||||
* functions does not take place in this file. coap.h includes coap_mem.h which
|
||||
* includes lwip headers (lwippools.h) which includes coap_internal.h which
|
||||
* includes coap_threadsafe_internal.h which does the mapping unless
|
||||
* COAP_THREAD_IGNORE_LOCKED_MAPPING is set.
|
||||
*/
|
||||
#define COAP_THREAD_IGNORE_LOCKED_MAPPING
|
||||
#endif
|
||||
|
||||
#include <coap3/coap.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -12,17 +12,6 @@
|
||||
|
||||
#include "coap_config.h"
|
||||
|
||||
#if COAP_THREAD_SAFE
|
||||
/*
|
||||
* Unfortunately, this needs to be set so that locking mapping of coap_
|
||||
* functions does not take place in this file. coap.h includes coap_mem.h which
|
||||
* includes lwip headers (lwippools.h) which includes coap_internal.h which
|
||||
* includes coap_threadsafe_internal.h which does the mapping unless
|
||||
* COAP_THREAD_IGNORE_LOCKED_MAPPING is set.
|
||||
*/
|
||||
#define COAP_THREAD_IGNORE_LOCKED_MAPPING
|
||||
#endif
|
||||
|
||||
#include <coap3/coap.h>
|
||||
#include "server-coap.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user