MCPcopy Create free account
hub / github.com/apache/brpc / get_attr

Method get_attr

src/bthread/task_group.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122int 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
136void TaskGroup::set_stopped(bthread_t tid) {
137 TaskMeta* const m = address_meta(tid);

Callers

nothing calls this directly

Calls 1

get_versionFunction · 0.70

Tested by

no test coverage detected