| 597 | } |
| 598 | |
| 599 | int bthread_list_init(bthread_list_t* list, |
| 600 | unsigned /*size*/, |
| 601 | unsigned /*conflict_size*/) { |
| 602 | list->impl = new (std::nothrow) bthread::TidList; |
| 603 | if (NULL == list->impl) { |
| 604 | return ENOMEM; |
| 605 | } |
| 606 | // Set unused fields to zero as well. |
| 607 | list->head = 0; |
| 608 | list->size = 0; |
| 609 | list->conflict_head = 0; |
| 610 | list->conflict_size = 0; |
| 611 | return 0; |
| 612 | } |
| 613 | |
| 614 | void bthread_list_destroy(bthread_list_t* list) { |
| 615 | delete static_cast<bthread::TidList*>(list->impl); |