예제 #1
0
thread_t::thread_t(process_t *p) :
	fiber_t( fiber_default_stack_size ),
	process( p ),
	MessageId(0),
	port(0),
	queue(0)
{
	id = allocate_id();
	addref( process );
	process->threads.append( this );
}
예제 #2
0
FT_TestReplica_i * FT_ReplicaFactory_i::create_replica(const char * name)
{
  // assume mutex is locked
  CORBA::ULong factoryId = allocate_id();

  FT_TestReplica_i * pFTReplica = 0;

  ACE_NEW_NORETURN(pFTReplica, FT_TestReplica_i(
    this,
    name,
    factoryId
    ));

  this->replicas_[factoryId] = pFTReplica;
  this->empty_slots_ -= 1;

  pFTReplica->init (this->orb_, this->name_persistent_file_);
  return pFTReplica;
}