version 1.28, 2011/06/20 17:54:20
|
version 1.37, 2011/09/14 14:34:28
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.0.prerelease.1 |
RPL/2 (R) version 4.1.3 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 809 instruction_save(struct_processus *s_eta
|
Line 809 instruction_save(struct_processus *s_eta
|
void |
void |
instruction_suspend(struct_processus *s_etat_processus) |
instruction_suspend(struct_processus *s_etat_processus) |
{ |
{ |
sigset_t masque; |
struct timespec attente; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 819 instruction_suspend(struct_processus *s_
|
Line 819 instruction_suspend(struct_processus *s_
|
|
|
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
{ |
{ |
printf("(attend un signal SIGCONT)\n\n"); |
printf("(attend un signal RPL/SIGCONT)\n\n"); |
printf(" Aucun argument\n"); |
printf(" Aucun argument\n"); |
} |
} |
else |
else |
{ |
{ |
printf("(wait for SIGCONT signal)\n\n"); |
printf("(wait for RPL/SIGCONT signal)\n\n"); |
printf(" No argument\n"); |
printf(" No argument\n"); |
} |
} |
|
|
Line 844 instruction_suspend(struct_processus *s_
|
Line 844 instruction_suspend(struct_processus *s_
|
} |
} |
} |
} |
|
|
if (sigfillset(&masque) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (sigdelset(&masque, SIGCONT) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (sigdelset(&masque, SIGFSTOP) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (sigdelset(&masque, SIGFABORT) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (sigdelset(&masque, SIGURG) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (sigdelset(&masque, SIGALRM) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
profilage(s_etat_processus, "Suspend"); |
profilage(s_etat_processus, "Suspend"); |
Line 904 instruction_suspend(struct_processus *s_
|
Line 868 instruction_suspend(struct_processus *s_
|
} |
} |
# endif |
# endif |
|
|
sigsuspend(&masque); |
for((*s_etat_processus).redemarrage_processus = d_faux;;) |
|
{ |
|
scrutation_interruptions(s_etat_processus); |
|
|
|
if ((*s_etat_processus).redemarrage_processus == d_vrai) |
|
{ |
|
break; |
|
} |
|
|
|
nanosleep(&attente, NULL); |
|
INCR_GRANULARITE(attente.tv_nsec); |
|
} |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |