qemudStartWorker() > libvirt

  1603 static int qemudStartWorker(struct qemud_server *server,
  1604                             struct qemud_worker *worker) {
  1605     pthread_attr_t attr;
  1606     pthread_attr_init(&attr);
  1607     /* We want to join workers, so don't detach them */
  1608     /*pthread_attr_setdetachstate(&attr, 1);*/
  1609
  1610     if (worker->hasThread)
  1611         return -1;
  1612
  1613     worker->server = server;
  1614     worker->hasThread = 1;
  1615     worker->quitRequest = 0;
  1616     worker->processingCall = 0;
  1617
  1618     if (pthread_create(&worker->thread,
  1619                        &attr,
  1620                        qemudWorker,
  1621                        worker) != 0) {

  1622         worker->hasThread = 0;
  1623         worker->server = NULL;
  1624         return -1;
  1625     }
  1626
  1627     return 0;
  1628 }
最終更新:2010年12月04日 01:18
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。