File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 4343#include "version.h"
4444#include "xml.h"
4545
46- /* lock for creating/ destroying ctx data */
47- pthread_rwlock_t ly_ctx_data_rwlock = PTHREAD_RWLOCK_INITIALIZER ;
46+ /**< lock for creating and destroying both private & shared context data */
47+ static pthread_rwlock_t ly_ctx_data_rwlock = PTHREAD_RWLOCK_INITIALIZER ;
4848
49- /* sized array of thread-specific context data */
50- struct ly_ctx_private_data * ly_private_ctx_data ;
49+ /**< sized array ([sized array](@ref sizedarrays)) of private context data.
50+ * The context is identified by the thread ID of the thread that created it and its address. */
51+ static struct ly_ctx_private_data * ly_private_ctx_data ;
5152
52- /* sized array of shared context data */
53- struct ly_ctx_shared_data * ly_shared_ctx_data ;
53+ /**< sized array ([sized array](@ref sizedarrays)) of shared context data.
54+ * The context is identified by the memory address of the context. */
55+ static struct ly_ctx_shared_data * ly_shared_ctx_data ;
5456
5557LIBYANG_API_DEF uint32_t
5658ly_version_so_major (void )
Original file line number Diff line number Diff line change @@ -374,13 +374,6 @@ struct ly_ctx_shared_data {
374374 struct ly_ht * leafref_links_ht ; /**< hash table of leafref links between term data nodes */
375375};
376376
377- extern pthread_rwlock_t ly_ctx_data_rwlock ; /**< lock for creating and destroying both private & shared context data */
378- extern struct ly_ctx_private_data * ly_private_ctx_data ; /**< sized array ([sized array](@ref sizedarrays)) of private context data.
379- * The context is identified by the thread ID of the thread that created it
380- * and its address. */
381- extern struct ly_ctx_shared_data * ly_shared_ctx_data ; /**< sized array ([sized array](@ref sizedarrays)) of shared context data.
382- * The context is identified by the memory address of the context. */
383-
384377#define LY_CTX_INT_IMMUTABLE 0x80000000 /**< marks a context that was printed into a fixed-size memory block and
385378 can even be shared between processes so it cannot be changed */
386379
You can’t perform that action at this time.
0 commit comments