| 695 | } |
| 696 | |
| 697 | int custom_join(custom_thread_t tid, void **value_ptr) |
| 698 | { |
| 699 | std::thread *ptr = (std::thread *)tid; |
| 700 | if (ptr) { |
| 701 | ptr->join(); |
| 702 | delete ptr; |
| 703 | return 0; |
| 704 | } |
| 705 | else printf(" Error: ptr of thread is NULL in custom_join() \n"); |
| 706 | |
| 707 | return -1; |
| 708 | } |
| 709 | |
| 710 | int custom_atomic_load_int(volatile int* obj) |
| 711 | { |