Commit 6e9ed1dc authored by Andreas Schmidt's avatar Andreas Schmidt

Rename sendThread.

parent 8ed7df12
......@@ -89,7 +89,7 @@ cdef extern from "prrt/socket.h":
int feedbackSocketFd
pthread_t receiveFeedbackThread
pthread_t sendThread
pthread_t sendDataThread
pthread_mutex_t outQueueFilledMutex
pthread_cond_t outQueueFilledCv
List* outQueue
......
......@@ -93,7 +93,7 @@ bool PrrtSocket_bind(PrrtSocket *sock_ptr, const char* ipAddress, const uint16_t
if(sock_ptr->isSender) {
check(pthread_create(&sock_ptr->receiveFeedbackThread, NULL, receive_feedback_loop, (void *) sock_ptr) ==
EXIT_SUCCESS, "Cannot create receive feedback thread.");
check(pthread_create(&sock_ptr->sendThread, NULL, send_data_loop, (void *) sock_ptr) == EXIT_SUCCESS,
check(pthread_create(&sock_ptr->sendDataThread, NULL, send_data_loop, (void *) sock_ptr) == EXIT_SUCCESS,
"Cannot create send thread.");
} else {
check(pthread_create(&sock_ptr->receiveDataThread, NULL, receive_data_loop, (void *) sock_ptr) == EXIT_SUCCESS,
......@@ -165,13 +165,13 @@ int PrrtSocket_interrupt(PrrtSocket *sock_ptr) {
check(pthread_mutex_unlock(&sock_ptr->closingMutex) == 0, "Unlock failed.");
void **res = NULL;
if (sock_ptr->sendThread != 0) {
if (sock_ptr->sendDataThread != 0) {
check(pthread_mutex_lock(&sock_ptr->outQueueFilledMutex) == 0, "Lock failed.");
check(pthread_cond_broadcast(&sock_ptr->outQueueFilledCv) == 0, "Broadcast failed.");
check(pthread_mutex_unlock(&sock_ptr->outQueueFilledMutex) == 0, "Unlock failed.");
check(pthread_join(sock_ptr->sendThread, res) == 0, "Join failed.");
sock_ptr->sendThread = 0;
check(pthread_join(sock_ptr->sendDataThread, res) == 0, "Join failed.");
sock_ptr->sendDataThread = 0;
}
if (sock_ptr->receiveDataThread != 0) {
......
......@@ -24,7 +24,7 @@ typedef struct prrtSocket {
PrrtClock* clock;
pthread_t sendThread;
pthread_t sendDataThread;
pthread_mutex_t outQueueFilledMutex;
pthread_cond_t outQueueFilledCv;
List *outQueue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment