version 1.132, 2017/06/29 12:33:34
|
version 1.134, 2017/07/02 22:29:02
|
Line 829 liberation(struct_processus *s_etat_proc
|
Line 829 liberation(struct_processus *s_etat_proc
|
struct_liste_chainee *l_element_suivant; |
struct_liste_chainee *l_element_suivant; |
|
|
integer8 i; |
integer8 i; |
|
integer8 (*__type_drop)(struct_processus *, |
|
void **); |
|
|
if (s_objet == NULL) |
if (s_objet == NULL) |
{ |
{ |
Line 958 liberation(struct_processus *s_etat_proc
|
Line 960 liberation(struct_processus *s_etat_proc
|
break; |
break; |
} |
} |
|
|
case EXT : |
|
{ |
|
if (decrementation_atomique(s_objet) > 0) |
|
{ |
|
return; |
|
} |
|
|
|
BUG((*s_objet).descripteur_bibliotheque == NULL, |
|
pthread_mutex_unlock(&((*s_objet).mutex)), |
|
printf("(*s_objet).liberation==NULL\n")); |
|
break; |
|
} |
|
|
|
case FCH : |
case FCH : |
{ |
{ |
if (decrementation_atomique(s_objet) > 0) |
if (decrementation_atomique(s_objet) > 0) |
Line 1514 liberation(struct_processus *s_etat_proc
|
Line 1503 liberation(struct_processus *s_etat_proc
|
break; |
break; |
} |
} |
|
|
|
case EXT: |
|
{ |
|
if (decrementation_atomique(s_objet) > 0) |
|
{ |
|
return; |
|
} |
|
|
|
// Appel de la fonction de duplication associée à l'objet |
|
// externe. Le descripteur de bibliothèque est directement |
|
// associé à la structure objet. |
|
|
|
if ((__type_drop = dlsym((*s_objet).descripteur_bibliotheque, |
|
"__type_drop")) == NULL) |
|
{ |
|
// La fonction de duplication n'existe pas dans la |
|
// bibliothèque. |
|
|
|
(*s_etat_processus).erreur_execution = d_ex_type_externe_drop; |
|
} |
|
else |
|
{ |
|
if (__type_drop(s_etat_processus, (void **) &s_objet) == 0) |
|
{ |
|
(*s_etat_processus).erreur_execution = |
|
d_ex_type_externe_drop; |
|
} |
|
} |
|
|
|
break; |
|
} |
|
|
default : |
default : |
{ |
{ |
if (pthread_mutex_unlock(&((*s_objet).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_objet).mutex)) != 0) |
Line 1612 copie_objet(struct_processus *s_etat_pro
|
Line 1632 copie_objet(struct_processus *s_etat_pro
|
|
|
integer8 i; |
integer8 i; |
integer8 j; |
integer8 j; |
|
integer8 (*__type_dup)(struct_processus *, void **); |
|
|
if (pthread_mutex_lock(&((*s_objet).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_objet).mutex)) != 0) |
{ |
{ |
Line 2831 copie_objet(struct_processus *s_etat_pro
|
Line 2852 copie_objet(struct_processus *s_etat_pro
|
} |
} |
|
|
break; |
break; |
|
} |
|
|
|
case EXT: |
|
{ |
|
if (type != 'O') |
|
{ |
|
incrementation_atomique(s_objet); |
|
return(s_objet); |
|
} |
|
|
|
// Appel de la fonction de duplication associée à l'objet |
|
// externe. Le descripteur de bibliothèque est directement |
|
// associé à la structure objet. |
|
|
|
if ((__type_dup = dlsym((*s_objet).descripteur_bibliotheque, |
|
"__type_dup")) == NULL) |
|
{ |
|
// La fonction de duplication n'existe pas dans la |
|
// bibliothèque. |
|
|
|
(*s_etat_processus).erreur_execution = d_ex_type_externe_dup; |
|
return(NULL); |
|
} |
|
|
|
s_nouvel_objet = s_objet; |
|
|
|
if (__type_dup(s_etat_processus, (void **) &s_nouvel_objet) == 0) |
|
{ |
|
return(NULL); |
|
} |
|
|
|
break; |
} |
} |
|
|
default : |
default : |