| 657 | } |
| 658 | |
| 659 | int bthread_id_list_add(bthread_id_list_t* list, bthread_id_t id) { |
| 660 | if (list->impl == NULL) { |
| 661 | list->impl = new (std::nothrow) bthread::IdList; |
| 662 | if (NULL == list->impl) { |
| 663 | return ENOMEM; |
| 664 | } |
| 665 | } |
| 666 | return static_cast<bthread::IdList*>(list->impl)->add(id); |
| 667 | } |
| 668 | |
| 669 | int bthread_id_list_reset(bthread_id_list_t* list, int error_code) { |
| 670 | return bthread_id_list_reset2(list, error_code, std::string()); |