/** * @param[in] J9OSCond The cond to destroy * @return 0 on success */ intptr_t j9OSCond_freeAndDestroy(J9OSCond cond) { omrthread_library_t lib = GLOBAL_DATA(default_library); intptr_t rc = pthread_cond_destroy(cond); omrthread_free_memory(lib, cond); return rc; }
/** * @param[in] J9OSMutex The mutex to free * @return 0 on success */ intptr_t j9OSMutex_freeAndDestroy(J9OSMutex mutex) { omrthread_library_t lib = GLOBAL_DATA(default_library); intptr_t rc = pthread_mutex_destroy(mutex); omrthread_free_memory(lib, mutex); return rc; }
/** * Free memory. * Function used by the library's pools. * * @param[in] user user data (thread library pointer) * @param[in] ptr pointer to memory to be freed * @param[in] type ignored * @return none * */ void omrthread_freeWrapper(void *user, void *ptr, uint32_t type) { omrthread_free_memory((omrthread_library_t)user, ptr); }