version 1.54, 2011/09/20 15:45:53
|
version 1.58, 2012/01/05 10:18:59
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.3 |
RPL/2 (R) version 4.1.5 |
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 73 lancement_thread(void *argument)
|
Line 73 lancement_thread(void *argument)
|
|
|
s_argument_thread = (struct_descripteur_thread *) argument; |
s_argument_thread = (struct_descripteur_thread *) argument; |
s_etat_processus = (*s_argument_thread).s_nouvel_etat_processus; |
s_etat_processus = (*s_argument_thread).s_nouvel_etat_processus; |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
sem_init(&((*s_etat_processus).semaphore_fork), 0, 0); |
|
# else |
|
if (((*s_etat_processus).semaphore_fork = sem_init3(0, getpid(), |
|
pthread_self(), SEM_FORK)) == SEM_FAILED) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
# endif |
|
|
(*s_argument_thread).tid = pthread_self(); |
(*s_argument_thread).tid = pthread_self(); |
(*s_argument_thread).thread_actif = d_vrai; |
(*s_argument_thread).thread_actif = d_vrai; |
|
|
Line 987 lancement_thread(void *argument)
|
Line 999 lancement_thread(void *argument)
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_destroy(&((*s_etat_processus).semaphore_fork)); |
sem_destroy(&((*s_etat_processus).semaphore_fork)); |
# else |
# else |
sem_destroy2((*s_etat_processus).semaphore_fork, getpid(), SEM_FORK); |
sem_destroy3((*s_etat_processus).semaphore_fork, getpid(), |
|
pthread_self(), SEM_FORK); |
# endif |
# endif |
|
|
liberation_contexte_cas(s_etat_processus); |
liberation_contexte_cas(s_etat_processus); |