Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
7cb6333e
Vérifiée
Valider
7cb6333e
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Reduce number of comments
parent
c4837981
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!67
Resolve "Thread pool"
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
inc/mthread/mthread.h
+25
-60
25 ajouts, 60 suppressions
inc/mthread/mthread.h
avec
25 ajouts
et
60 suppressions
inc/mthread/mthread.h
+
25
−
60
Voir le fichier @
7cb6333e
...
@@ -45,65 +45,31 @@ typedef struct mthread_sem_s mthread_sem_t;
...
@@ -45,65 +45,31 @@ typedef struct mthread_sem_s mthread_sem_t;
/* Function for handling threads. */
/* Function for handling threads. */
/* Create a thread with given attributes ATTR (or default attributes
if ATTR is NULL), and call function START_ROUTINE with given
arguments ARG. */
int
mthread_create
(
mthread_t
*
__threadp
,
const
mthread_attr_t
*
__attr
,
void
*
(
*
__start_routine
)
(
void
*
),
int
mthread_create
(
mthread_t
*
__threadp
,
const
mthread_attr_t
*
__attr
,
void
*
(
*
__start_routine
)
(
void
*
),
void
*
__arg
);
void
*
__arg
);
/* Obtain the identifier of the current thread. */
mthread_t
mthread_self
(
void
);
mthread_t
mthread_self
(
void
);
/* Compare two thread identifiers. */
int
mthread_equal
(
mthread_t
__thread1
,
mthread_t
__thread2
);
int
mthread_equal
(
mthread_t
__thread1
,
mthread_t
__thread2
);
/* Terminate calling thread. */
void
mthread_exit
(
void
*
__retval
);
void
mthread_exit
(
void
*
__retval
);
/* Make calling thread wait for termination of the thread TH. The
exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN
is not NULL. */
int
mthread_join
(
mthread_t
__th
,
void
**
__thread_return
);
int
mthread_join
(
mthread_t
__th
,
void
**
__thread_return
);
/* Functions for mutex handling. */
/* Functions for mutex handling. */
/* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
default values if later is NULL. */
int
mthread_mutex_init
(
mthread_mutex_t
*
__mutex
,
int
mthread_mutex_init
(
mthread_mutex_t
*
__mutex
,
const
mthread_mutexattr_t
*
__mutex_attr
);
const
mthread_mutexattr_t
*
__mutex_attr
);
/* Destroy MUTEX. */
int
mthread_mutex_destroy
(
mthread_mutex_t
*
__mutex
);
int
mthread_mutex_destroy
(
mthread_mutex_t
*
__mutex
);
/* Try to lock MUTEX. */
int
mthread_mutex_trylock
(
mthread_mutex_t
*
__mutex
);
int
mthread_mutex_trylock
(
mthread_mutex_t
*
__mutex
);
/* Wait until lock for MUTEX becomes available and lock it. */
int
mthread_mutex_lock
(
mthread_mutex_t
*
__mutex
);
int
mthread_mutex_lock
(
mthread_mutex_t
*
__mutex
);
/* Unlock MUTEX. */
int
mthread_mutex_unlock
(
mthread_mutex_t
*
__mutex
);
int
mthread_mutex_unlock
(
mthread_mutex_t
*
__mutex
);
/* Functions for handling conditional variables. */
/* Functions for handling conditional variables. */
/* Initialize condition variable COND using attributes ATTR, or use
the default values if later is NULL. */
int
mthread_cond_init
(
mthread_cond_t
*
__cond
,
int
mthread_cond_init
(
mthread_cond_t
*
__cond
,
const
mthread_condattr_t
*
__cond_attr
);
const
mthread_condattr_t
*
__cond_attr
);
/* Destroy condition variable COND. */
int
mthread_cond_destroy
(
mthread_cond_t
*
__cond
);
int
mthread_cond_destroy
(
mthread_cond_t
*
__cond
);
/* Wake up one thread waiting for condition variable COND. */
int
mthread_cond_signal
(
mthread_cond_t
*
__cond
);
int
mthread_cond_signal
(
mthread_cond_t
*
__cond
);
/* Wake up all threads waiting for condition variables COND. */
int
mthread_cond_broadcast
(
mthread_cond_t
*
__cond
);
int
mthread_cond_broadcast
(
mthread_cond_t
*
__cond
);
int
mthread_cond_wait
(
mthread_cond_t
*
__cond
,
mthread_mutex_t
*
__mutex
);
/* Wait for condition variable COND to be signaled or broadcast.
MUTEX is assumed to be locked before. */
int
mthread_cond_wait
(
mthread_cond_t
*
__cond
,
mthread_mutex_t
*
__mutex
);
/* Functions for handling thread-specific data. */
/* Functions for handling thread-specific data. */
...
@@ -113,8 +79,7 @@ int mthread_cond_wait (mthread_cond_t *__cond,
...
@@ -113,8 +79,7 @@ int mthread_cond_wait (mthread_cond_t *__cond,
associated to that key when the key is destroyed.
associated to that key when the key is destroyed.
DESTR_FUNCTION is not called if the value associated is NULL when
DESTR_FUNCTION is not called if the value associated is NULL when
the key is destroyed. */
the key is destroyed. */
int
mthread_key_create
(
mthread_key_t
*
__key
,
int
mthread_key_create
(
mthread_key_t
*
__key
,
void
(
*
__destr_function
)
(
void
*
));
void
(
*
__destr_function
)
(
void
*
));
/* Destroy KEY. */
/* Destroy KEY. */
int
mthread_key_delete
(
mthread_key_t
__key
);
int
mthread_key_delete
(
mthread_key_t
__key
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter