1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

globals: Remove functions related to global state handling

- xmlGetGlobalState
- xmlInitializeGlobalState
- xmlGetThreadId
- xmlIsMainThread
This commit is contained in:
Nick Wellnhofer
2025-03-04 16:07:40 +01:00
parent 03a8d5f93d
commit 85bd58ef56
7 changed files with 5 additions and 118 deletions

View File

@@ -301,35 +301,6 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
* *
************************************************************************/
/**
* xmlGetThreadId:
*
* DEPRECATED: Internal function, do not use.
*
* xmlGetThreadId() find the current thread ID number
* Note that this is likely to be broken on some platforms using pthreads
* as the specification doesn't mandate pthread_t to be an integer type
*
* Returns the current thread ID number
*/
int
xmlGetThreadId(void)
{
#ifdef HAVE_POSIX_THREADS
pthread_t id;
int ret;
id = pthread_self();
/* horrible but preserves compat, see warning above */
memcpy(&ret, &id, sizeof(ret));
return (ret);
#elif defined HAVE_WIN32_THREADS
return GetCurrentThreadId();
#else
return ((int) 0);
#endif
}
/**
* xmlLockLibrary:
*