MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / pthread_create

Function pthread_create

Source/astcenccli_platform_dependents.cpp:62–79  ·  view source on GitHub ↗

* @brief Proxy Windows @c CreateThread underneath a pthreads-like wrapper. */

Source from the content-addressed store, hash-verified

60 * @brief Proxy Windows @c CreateThread underneath a pthreads-like wrapper.
61 */
62static int pthread_create(
63 pthread_t* thread,
64 const pthread_attr_t* attribs,
65 void* (*threadfunc)(void*),
66 void* thread_arg
67) {
68 static_cast<void>(attribs);
69 LPTHREAD_START_ROUTINE func = reinterpret_cast<LPTHREAD_START_ROUTINE>(threadfunc);
70 *thread = CreateThread(nullptr, 0, func, thread_arg, 0, nullptr);
71
72 // Ensure we return 0 on success, non-zero on error
73 if (*thread == NULL)
74 {
75 return 1;
76 }
77
78 return 0;
79}
80
81/**
82 * @brief Manually set CPU group and thread affinity.

Callers 1

launch_threadsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected