[Phi] implementing fully async queues, fences and semaphores
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <Daemon.h>
|
||||
#include <Logger.h>
|
||||
#include <Memory.h>
|
||||
#include <Queue.h>
|
||||
|
||||
static int HandleHello(PhiEndpoint endpoint, const PhiMessageHeader* header)
|
||||
{
|
||||
@@ -39,7 +40,10 @@ PhiEndpoint StartDaemon(void)
|
||||
|
||||
PhiEndpoint endpoint = TransportListen(PHI_TRANSPORT_PORT);
|
||||
if(endpoint == PHI_ENDPOINT_INVALID)
|
||||
{
|
||||
LogError("Could not listen on the Phi transport");
|
||||
return 0;
|
||||
}
|
||||
|
||||
LogInfo("Daemon started");
|
||||
return endpoint;
|
||||
@@ -92,6 +96,9 @@ int HandlePacket(PhiEndpoint endpoint)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
case PHI_PACKET_QUEUE_SETUP:
|
||||
return HandleQueueSetup(endpoint, &header);
|
||||
|
||||
case PHI_PACKET_SHUTDOWN:
|
||||
if(DrainPayload(endpoint, header.payload_size) < 0)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user