Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 91f4cb0e rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Init mthread in lektord

parent 8397618e
Branches
Étiquettes
1 requête de fusion!67Resolve "Thread pool"
...@@ -73,21 +73,9 @@ int mthread_cond_wait(mthread_cond_t *__cond, mthread_mutex_t *__mutex); ...@@ -73,21 +73,9 @@ int mthread_cond_wait(mthread_cond_t *__cond, mthread_mutex_t *__mutex);
/* Functions for handling thread-specific data. */ /* Functions for handling thread-specific data. */
/* Create a key value identifying a location in the thread-specific
data area. Each thread maintains a distinct thread-specific data
area. DESTR_FUNCTION, if non-NULL, is called with the value
associated to that key when the key is destroyed.
DESTR_FUNCTION is not called if the value associated is NULL when
the key is destroyed. */
int mthread_key_create(mthread_key_t *__key, void (*__destr_function) (void *)); int mthread_key_create(mthread_key_t *__key, void (*__destr_function) (void *));
/* Destroy KEY. */
int mthread_key_delete(mthread_key_t __key); int mthread_key_delete(mthread_key_t __key);
/* Store POINTER in the thread-specific data slot identified by KEY. */
int mthread_setspecific(mthread_key_t __key, const void *__pointer); int mthread_setspecific(mthread_key_t __key, const void *__pointer);
/* Return current value of the thread-specific data slot identified by KEY. */
void *mthread_getspecific(mthread_key_t __key); void *mthread_getspecific(mthread_key_t __key);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <lektor/config.h> #include <lektor/config.h>
#include <lektor/net.h> #include <lektor/net.h>
#include <lektor/database.h> #include <lektor/database.h>
#include <mthread/mthread.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
...@@ -56,6 +57,7 @@ main(int argc, char *argv[]) ...@@ -56,6 +57,7 @@ main(int argc, char *argv[])
normal_launch: normal_launch:
fprintf(stderr, " * Lektor launched by user %s (shell: %s, home: %s)\n", fprintf(stderr, " * Lektor launched by user %s (shell: %s, home: %s)\n",
pw->pw_name, pw->pw_shell, pw->pw_dir); pw->pw_name, pw->pw_shell, pw->pw_dir);
mthread_init();
return lkt_listen(); return lkt_listen();
} }
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter