Skip to content
Extraits de code Groupes Projets
Valider 2a2c83d4 rédigé par Laurent Paucot's avatar Laurent Paucot
Parcourir les fichiers

N = 4

parent 30f1e369
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #4039 réussi
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#define N 1 #define N 4
//travailler avec des linkendList //travailler avec des linkendList
typedef struct node{ typedef struct node{
long value; long value;
...@@ -176,7 +176,7 @@ void *writing(void *param){ ...@@ -176,7 +176,7 @@ void *writing(void *param){
struct buffer_cw *param1 = (struct buffer_cw *) param; struct buffer_cw *param1 = (struct buffer_cw *) param;
while(param1->stop < N-1 || param1->len > 0){ while(param1->stop < N || param1->len > 0){
pthread_mutex_unlock(&mutex2); pthread_mutex_unlock(&mutex2);
sem_wait(&full2); sem_wait(&full2);
pthread_mutex_lock(&mutex2); pthread_mutex_lock(&mutex2);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter