Skip to content

Commit

Permalink
undo sys/wait
Browse files Browse the repository at this point in the history
  • Loading branch information
Spielberg50 committed Dec 12, 2021
1 parent 08f3b4b commit 44276cc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions scripts/td1/exo1/calcul_carre.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <pthread.h>./
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
// #include <sys/wait.h>
// #include <sys/types.h>


void *calculer_carre(void *nombre) {
Expand Down
6 changes: 3 additions & 3 deletions scripts/td1/exo1/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
// #include <sys/wait.h>
// #include <sys/types.h>

void *thread_function(void *var) { //le code a executer par un thread

Expand Down Expand Up @@ -42,6 +42,6 @@ int main(){
for(int j = 0; j < 10; j++){
printf("\n %d",resulttab[j]);
}
printf("Thread principal, la valeure de retour du thread %p est: %d\n",tid,i);
printf("\nThread principal, la valeure de retour du thread %p est: %d\n",tid,i);
return 0;
}
2 changes: 1 addition & 1 deletion scripts/td1/exo1/n_puissances_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/wait.h>
// #include <sys/wait.h>
#include <sys/types.h>


Expand Down
2 changes: 1 addition & 1 deletion scripts/td1/exo1/structure.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/wait.h>
// #include <sys/wait.h>
#include <sys/types.h>


Expand Down
3 changes: 2 additions & 1 deletion scripts/td1/exo2/parallel.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/wait.h>
// #include <sys/wait.h>
#include <sys/types.h>
#include <math.h>
#define nb 18446743979220271
Expand Down
Binary file added scripts/td1/exo2/parallel.exe
Binary file not shown.

1 comment on commit 44276cc

@adelbke
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ou hada wesh jabou lehna "scripts/td1/exo2/parallel.exe" ????

Please sign in to comment.