version 1.35, 2011/09/14 17:55:59
|
version 1.43, 2012/03/01 10:14:07
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.3 |
RPL/2 (R) version 4.1.7 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 788 instruction_poke(struct_processus *s_eta
|
Line 788 instruction_poke(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_fork)) |
# ifndef SEMAPHORES_NOMMES |
!= 0) |
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 801 instruction_poke(struct_processus *s_eta
|
Line 805 instruction_poke(struct_processus *s_eta
|
.pipe_nombre_injections[1], "-", |
.pipe_nombre_injections[1], "-", |
sizeof(unsigned char))) != sizeof(unsigned char)) |
sizeof(unsigned char))) != sizeof(unsigned char)) |
{ |
{ |
if (pthread_mutex_lock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
while(sem_wait( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 845 instruction_poke(struct_processus *s_eta
|
Line 858 instruction_poke(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_unlock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
if (sem_post( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 867 instruction_poke(struct_processus *s_eta
|
Line 885 instruction_poke(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_fork)) |
# ifndef SEMAPHORES_NOMMES |
!= 0) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (registre_stop == 0) |
if (registre_stop == 0) |
Line 1011 instruction_poke(struct_processus *s_eta
|
Line 1036 instruction_poke(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
if (pthread_mutex_unlock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
if (sem_post( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 1024 instruction_poke(struct_processus *s_eta
|
Line 1054 instruction_poke(struct_processus *s_eta
|
.pipe_nombre_injections[1], "-", |
.pipe_nombre_injections[1], "-", |
sizeof(unsigned char))) != sizeof(unsigned char)) |
sizeof(unsigned char))) != sizeof(unsigned char)) |
{ |
{ |
if (pthread_mutex_lock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
while(sem_wait( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 1068 instruction_poke(struct_processus *s_eta
|
Line 1107 instruction_poke(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_unlock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
if (sem_post( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 1090 instruction_poke(struct_processus *s_eta
|
Line 1134 instruction_poke(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
if (pthread_mutex_lock( |
# ifndef SEMAPHORES_NOMMES |
&((*s_etat_processus).mutex_fork)) != 0) |
while(sem_wait( |
|
&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait( |
|
(*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
if (registre_stop == 0) |
if (registre_stop == 0) |