| 120 | |
| 121 | |
| 122 | int TaskGroup::get_attr(bthread_t tid, bthread_attr_t* out) { |
| 123 | TaskMeta* const m = address_meta(tid); |
| 124 | if (m != NULL) { |
| 125 | const uint32_t given_ver = get_version(tid); |
| 126 | BAIDU_SCOPED_LOCK(m->version_lock); |
| 127 | if (given_ver == *m->version_butex) { |
| 128 | *out = m->attr; |
| 129 | return 0; |
| 130 | } |
| 131 | } |
| 132 | errno = EINVAL; |
| 133 | return -1; |
| 134 | } |
| 135 | |
| 136 | void TaskGroup::set_stopped(bthread_t tid) { |
| 137 | TaskMeta* const m = address_meta(tid); |
nothing calls this directly
no test coverage detected