Implement POSIX support

This commit is contained in:
Diego Waxemberg
2014-01-19 02:24:04 -05:00
parent 2f18a9aea7
commit 128a5e113a
7 changed files with 108 additions and 49 deletions

View File

@@ -45,7 +45,7 @@ int initializeControlStream(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfigP
}
void requestIdrFrame(void) {
PltSetEvent(resyncEvent);
PltSetEvent(&resyncEvent);
}
static PNVCTL_PACKET_HEADER readNvctlPacket(void) {
@@ -143,7 +143,7 @@ static void resyncThreadFunc(void* context) {
header.type = PTYPE_RESYNC;
header.payloadLength = PPAYLEN_RESYNC;
for (;;) {
PltWaitForEvent(resyncEvent);
PltWaitForEvent(&resyncEvent);
err = send(ctlSock, (char*) &header, sizeof(header), 0);
if (err != sizeof(header)) {
@@ -161,20 +161,20 @@ static void resyncThreadFunc(void* context) {
return;
}
PltClearEvent(resyncEvent);
PltClearEvent(&resyncEvent);
}
}
int stopControlStream(void) {
closesocket(ctlSock);
PltJoinThread(heartbeatThread);
PltJoinThread(jitterThread);
PltJoinThread(resyncThread);
PltJoinThread(&heartbeatThread);
PltJoinThread(&jitterThread);
PltJoinThread(&resyncThread);
PltCloseThread(heartbeatThread);
PltCloseThread(jitterThread);
PltCloseThread(resyncThread);
PltCloseThread(&heartbeatThread);
PltCloseThread(&jitterThread);
PltCloseThread(&resyncThread);
return 0;
}