MCPcopy Create free account
hub / github.com/NetSys/bess / BlockWorker

Method BlockWorker

core/worker.cc:253–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253int Worker::BlockWorker() {
254 worker_signal t;
255 int ret;
256
257 status_ = WORKER_PAUSED;
258
259 ret = read(fd_event_, &t, sizeof(t));
260 CHECK_EQ(ret, sizeof(t));
261
262 if (t == worker_signal::unblock) {
263 status_ = WORKER_RUNNING;
264 return 0;
265 }
266
267 if (t == worker_signal::quit) {
268 status_ = WORKER_FINISHED;
269 return 1;
270 }
271
272 CHECK(0);
273 return 0;
274}
275
276/* The entry point of worker threads */
277void *Worker::Run(void *_arg) {

Callers 2

ScheduleLoopMethod · 0.80
ScheduleLoopMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected