version 1.76, 2013/03/11 11:07:25
|
version 1.85, 2013/05/30 09:41:41
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.13 |
RPL/2 (R) version 4.1.14 |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 245 instruction_wait(struct_processus *s_eta
|
Line 245 instruction_wait(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
temporisation.tv_sec = (long) floor((double) attente); |
temporisation.tv_sec = (time_t) floor((double) attente); |
temporisation.tv_nsec = (attente - temporisation.tv_sec) * |
temporisation.tv_nsec = (long) ((attente - |
(long) 1000000000; |
((real8) temporisation.tv_sec)) * (integer8) 1000000000); |
|
|
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 289 instruction_wait(struct_processus *s_eta
|
Line 289 instruction_wait(struct_processus *s_eta
|
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
|
if (pthread_mutex_lock(&(*s_etat_processus).mutex_interruptions) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&(*s_etat_processus).mutex_interruptions) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
traitement_interruptions_logicielles(s_etat_processus); |
traitement_interruptions_logicielles(s_etat_processus); |
Line 390 instruction_write(struct_processus *s_et
|
Line 404 instruction_write(struct_processus *s_et
|
integer8 clef; |
integer8 clef; |
integer8 compteur; |
integer8 compteur; |
integer8 id; |
integer8 id; |
|
integer8 longueur; |
|
integer8 longueur_effective; |
integer8 ordre; |
integer8 ordre; |
|
integer8 recursivite; |
|
|
logical1 format_degenere; |
logical1 format_degenere; |
logical1 mise_a_jour; |
logical1 mise_a_jour; |
|
|
long longueur; |
|
long longueur_effective; |
|
long recursivite; |
|
|
|
sqlite3_stmt *ppStmt; |
sqlite3_stmt *ppStmt; |
|
|
Line 710 instruction_write(struct_processus *s_et
|
Line 724 instruction_write(struct_processus *s_et
|
free(chaine_utf8); |
free(chaine_utf8); |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
Line 757 instruction_write(struct_processus *s_et
|
Line 771 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
Line 934 instruction_write(struct_processus *s_et
|
Line 948 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
Line 980 instruction_write(struct_processus *s_et
|
Line 994 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur) |
if (sqlite3_prepare_v2((*descripteur) |
.descripteur_sqlite, |
.descripteur_sqlite, commande, |
commande, strlen(commande), &ppStmt, &queue) |
(int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 1014 instruction_write(struct_processus *s_et
|
Line 1028 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur) |
if (sqlite3_prepare_v2((*descripteur) |
.descripteur_sqlite, |
.descripteur_sqlite, commande, |
commande, strlen(commande), &ppStmt, &queue) |
(int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 1078 instruction_write(struct_processus *s_et
|
Line 1092 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 1114 instruction_write(struct_processus *s_et
|
Line 1128 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
(*s_etat_processus).erreur_systeme = d_es_erreur_fichier; |
Line 1250 instruction_write(struct_processus *s_et
|
Line 1264 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
if (sqlite3_prepare_v2((*descripteur).descripteur_sqlite, |
commande, strlen(commande), &ppStmt, &queue) |
commande, (int) strlen(commande), &ppStmt, &queue) |
!= SQLITE_OK) |
!= SQLITE_OK) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 1343 instruction_write(struct_processus *s_et
|
Line 1357 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
if (fwrite(chaine, sizeof(unsigned char), longueur_effective, |
if (fwrite(chaine, sizeof(unsigned char), |
|
(size_t) longueur_effective, |
(*descripteur).descripteur_c) != |
(*descripteur).descripteur_c) != |
(size_t) longueur_effective) |
(size_t) longueur_effective) |
{ |
{ |
Line 1500 instruction_write(struct_processus *s_et
|
Line 1515 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
longueur = strlen(format_chaine); |
longueur = (integer8) strlen(format_chaine); |
|
|
if (format_chaine[longueur - 1] != ')') |
if (format_chaine[longueur - 1] != ')') |
{ |
{ |
Line 1525 instruction_write(struct_processus *s_et
|
Line 1540 instruction_write(struct_processus *s_et
|
// Détermination de la longueur |
// Détermination de la longueur |
format_degenere = d_faux; |
format_degenere = d_faux; |
|
|
if (sscanf(&(format_chaine[8]), "%ld", &longueur) != 1) |
if (sscanf(&(format_chaine[8]), "%lld", &longueur) != 1) |
{ |
{ |
free(format_chaine); |
free(format_chaine); |
|
|
Line 1553 instruction_write(struct_processus *s_et
|
Line 1568 instruction_write(struct_processus *s_et
|
(longueur_effective < longueur)) |
(longueur_effective < longueur)) |
{ |
{ |
if (fwrite(chaine, sizeof(unsigned char), |
if (fwrite(chaine, sizeof(unsigned char), |
longueur_effective, |
(size_t) longueur_effective, |
(*descripteur).descripteur_c) != |
(*descripteur).descripteur_c) != |
(size_t) longueur_effective) |
(size_t) longueur_effective) |
{ |
{ |
Line 1565 instruction_write(struct_processus *s_et
|
Line 1580 instruction_write(struct_processus *s_et
|
else |
else |
{ |
{ |
if (fwrite(chaine, sizeof(unsigned char), |
if (fwrite(chaine, sizeof(unsigned char), |
longueur_effective, |
(size_t) longueur_effective, |
(*descripteur).descripteur_c) != |
(*descripteur).descripteur_c) != |
(size_t) longueur) |
(size_t) longueur) |
{ |
{ |
Line 1645 instruction_write(struct_processus *s_et
|
Line 1660 instruction_write(struct_processus *s_et
|
* Sockets non formatées |
* Sockets non formatées |
*/ |
*/ |
|
|
chaine = NULL; |
if ((chaine = formateur_fichier(s_etat_processus, |
|
s_objet_argument_2, (*((struct_socket *) |
|
(*s_objet_argument_1).objet)).format, 0, 0, ' ', 'U', |
|
&longueur_effective, &recursivite, d_faux)) == NULL) |
|
{ |
|
liberation(s_etat_processus, s_objet_argument_2); |
|
liberation(s_etat_processus, s_objet_argument_1); |
|
|
|
return; |
|
} |
} |
} |
else |
else |
{ |
{ |
Line 1707 instruction_write(struct_processus *s_et
|
Line 1731 instruction_write(struct_processus *s_et
|
} |
} |
|
|
if (send((*((struct_socket *) (*s_objet_argument_1).objet)) |
if (send((*((struct_socket *) (*s_objet_argument_1).objet)) |
.socket, chaine, longueur_effective, 0) < 0) |
.socket, chaine, (size_t) longueur_effective, 0) < 0) |
{ |
{ |
ios = errno; |
ios = errno; |
|
|
Line 1810 instruction_write(struct_processus *s_et
|
Line 1834 instruction_write(struct_processus *s_et
|
|
|
if (sendto((*((struct_socket *) |
if (sendto((*((struct_socket *) |
(*s_objet_argument_1).objet)).socket, chaine, |
(*s_objet_argument_1).objet)).socket, chaine, |
longueur_effective, 0, (struct sockaddr *) |
(size_t) longueur_effective, 0, (struct sockaddr *) |
&adresse_unix, sizeof(adresse_unix)) < 0) |
&adresse_unix, sizeof(adresse_unix)) < 0) |
{ |
{ |
ios = errno; |
ios = errno; |
Line 1871 instruction_write(struct_processus *s_et
|
Line 1895 instruction_write(struct_processus *s_et
|
{ // Adresse IPv4 |
{ // Adresse IPv4 |
calcul_adresse = 0; |
calcul_adresse = 0; |
for(i = 0; i < 4; calcul_adresse = |
for(i = 0; i < 4; calcul_adresse = |
(256 * calcul_adresse) + adresse[i++]); |
(256 * calcul_adresse) + |
|
((unsigned char) adresse[i++])); |
|
|
memset(&adresse_ipv4, 0, sizeof(adresse_ipv4)); |
memset(&adresse_ipv4, 0, sizeof(adresse_ipv4)); |
adresse_ipv4.sin_family = AF_INET; |
adresse_ipv4.sin_family = AF_INET; |
adresse_ipv4.sin_port = htons(port); |
adresse_ipv4.sin_port = htons((uint16_t) port); |
adresse_ipv4.sin_addr.s_addr = htonl(calcul_adresse); |
adresse_ipv4.sin_addr.s_addr = htonl(calcul_adresse); |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
Line 1891 instruction_write(struct_processus *s_et
|
Line 1916 instruction_write(struct_processus *s_et
|
|
|
if (sendto((*((struct_socket *) |
if (sendto((*((struct_socket *) |
(*s_objet_argument_1).objet)).socket, chaine, |
(*s_objet_argument_1).objet)).socket, chaine, |
longueur_effective, 0, (struct sockaddr *) |
(size_t) longueur_effective, 0, (struct sockaddr *) |
&adresse_ipv4, sizeof(adresse_ipv4)) < 0) |
&adresse_ipv4, sizeof(adresse_ipv4)) < 0) |
{ |
{ |
ios = errno; |
ios = errno; |
Line 1975 instruction_write(struct_processus *s_et
|
Line 2000 instruction_write(struct_processus *s_et
|
|
|
for(i = 0; i < 16; |
for(i = 0; i < 16; |
adresse_ipv6.sin6_addr.s6_addr[i] = |
adresse_ipv6.sin6_addr.s6_addr[i] = |
adresse[i], i++); |
(unsigned char) adresse[i], i++); |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
Line 1990 instruction_write(struct_processus *s_et
|
Line 2015 instruction_write(struct_processus *s_et
|
|
|
if (sendto((*((struct_socket *) |
if (sendto((*((struct_socket *) |
(*s_objet_argument_1).objet)).socket, chaine, |
(*s_objet_argument_1).objet)).socket, chaine, |
longueur_effective, 0, (struct sockaddr *) |
(size_t) longueur_effective, 0, (struct sockaddr *) |
&adresse_ipv6, sizeof(adresse_ipv6)) < 0) |
&adresse_ipv6, sizeof(adresse_ipv6)) < 0) |
{ |
{ |
ios = errno; |
ios = errno; |
Line 2268 instruction_wflock(struct_processus *s_e
|
Line 2293 instruction_wflock(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
|
if (pthread_mutex_lock(&(*s_etat_processus).mutex_interruptions) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue |
if (pthread_mutex_unlock(&(*s_etat_processus) |
!= 0) |
.mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
registre_instruction_valide = |
registre_instruction_valide = |
(*s_etat_processus).instruction_valide; |
(*s_etat_processus).instruction_valide; |
Line 2388 instruction_wfproc(struct_processus *s_e
|
Line 2426 instruction_wfproc(struct_processus *s_e
|
} |
} |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_pile_processus)) |
|
!= 0) |
{ |
{ |
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 2453 instruction_wfproc(struct_processus *s_e
|
Line 2492 instruction_wfproc(struct_processus *s_e
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2533 instruction_wfproc(struct_processus *s_e
|
Line 2573 instruction_wfproc(struct_processus *s_e
|
* Le processus n'est pas terminé |
* Le processus n'est pas terminé |
*/ |
*/ |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus) |
|
.mutex_interruptions)) != 0) |
{ |
{ |
|
pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)); |
|
|
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
Line 2551 instruction_wfproc(struct_processus *s_e
|
Line 2595 instruction_wfproc(struct_processus *s_e
|
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue |
if (pthread_mutex_unlock(&((*s_etat_processus) |
!= 0) |
.mutex_interruptions)) != 0) |
|
{ |
|
pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)); |
|
|
|
if ((*s_etat_processus).profilage == d_vrai) |
|
{ |
|
profilage(s_etat_processus, NULL); |
|
} |
|
|
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
if (pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
|
{ |
|
if ((*s_etat_processus).profilage == d_vrai) |
|
{ |
|
profilage(s_etat_processus, NULL); |
|
} |
|
|
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
registre_instruction_valide = |
registre_instruction_valide = |
(*s_etat_processus).instruction_valide; |
(*s_etat_processus).instruction_valide; |
Line 2591 instruction_wfproc(struct_processus *s_e
|
Line 2663 instruction_wfproc(struct_processus *s_e
|
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
{ |
{ |
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 2613 instruction_wfproc(struct_processus *s_e
|
Line 2686 instruction_wfproc(struct_processus *s_e
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) |
|
!= 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2716 instruction_wfdata(struct_processus *s_e
|
Line 2790 instruction_wfdata(struct_processus *s_e
|
} |
} |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_pile_processus)) |
|
!= 0) |
{ |
{ |
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 2776 instruction_wfdata(struct_processus *s_e
|
Line 2851 instruction_wfdata(struct_processus *s_e
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2819 instruction_wfdata(struct_processus *s_e
|
Line 2895 instruction_wfdata(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
{ |
{ |
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 2860 instruction_wfdata(struct_processus *s_e
|
Line 2937 instruction_wfdata(struct_processus *s_e
|
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
|
if (pthread_mutex_lock(&(*s_etat_processus) |
|
.mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees |
if ((*s_etat_processus).nombre_interruptions_non_affectees |
!= 0) |
!= 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&(*s_etat_processus) |
|
.mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
registre_instruction_valide = |
registre_instruction_valide = |
Line 2885 instruction_wfdata(struct_processus *s_e
|
Line 2976 instruction_wfdata(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
{ |
{ |
if ((*s_etat_processus).profilage == d_vrai) |
if ((*s_etat_processus).profilage == d_vrai) |
{ |
{ |
Line 2912 instruction_wfdata(struct_processus *s_e
|
Line 3004 instruction_wfdata(struct_processus *s_e
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) |
|
!= 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 3596 instruction_wfswi(struct_processus *s_et
|
Line 3689 instruction_wfswi(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
|
if (pthread_mutex_lock(&(*s_etat_processus).mutex_interruptions) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&(*s_etat_processus).mutex_interruptions) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).queue_interruptions[interruption - 1] > 0) |
if ((*s_etat_processus).queue_interruptions[interruption - 1] > 0) |
{ |
{ |
drapeau_fin = d_vrai; |
drapeau_fin = d_vrai; |
Line 3733 instruction_wfpoke(struct_processus *s_e
|
Line 3840 instruction_wfpoke(struct_processus *s_e
|
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
|
if (pthread_mutex_lock(&(*s_etat_processus).mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&(*s_etat_processus).mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
registre_instruction_valide = |
registre_instruction_valide = |
Line 3840 instruction_wfack(struct_processus *s_et
|
Line 3959 instruction_wfack(struct_processus *s_et
|
{ |
{ |
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
|
if (pthread_mutex_lock(&(*s_etat_processus).mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
affectation_interruptions_logicielles(s_etat_processus); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&(*s_etat_processus).mutex_interruptions) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
if ((*s_etat_processus).nombre_interruptions_en_queue != 0) |
{ |
{ |
registre_instruction_valide = |
registre_instruction_valide = |