removal of malloc and memset in threading_init
This commit is contained in:
+3
-7
@@ -466,13 +466,9 @@ void *thread_btm(){
|
|||||||
|
|
||||||
void threading_init(){
|
void threading_init(){
|
||||||
|
|
||||||
top_buffer = malloc(sizeof(char));
|
top_buffer = NULL;
|
||||||
rgt_buffer = malloc(sizeof(char));
|
rgt_buffer = NULL;
|
||||||
btm_buffer = malloc(sizeof(char));
|
btm_buffer = NULL;
|
||||||
memset(top_buffer, '\0', sizeof(char));
|
|
||||||
memset(rgt_buffer, '\0', sizeof(char));
|
|
||||||
memset(btm_buffer, '\0', sizeof(char));
|
|
||||||
|
|
||||||
|
|
||||||
pthread_mutex_init(&mutex_top, NULL);
|
pthread_mutex_init(&mutex_top, NULL);
|
||||||
pthread_mutex_init(&mutex_mid, NULL);
|
pthread_mutex_init(&mutex_mid, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user