add new files to the tree

This commit is contained in:
roberto@sirius
2010-10-20 21:55:37 +02:00
parent f7aa451af4
commit be183bf07f
13 changed files with 2552 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "uwsgi_python.h"
extern struct uwsgi_server uwsgi;
extern struct uwsgi_python up;
void gil_real_get() {
PyEval_AcquireLock();
PyThreadState_Swap((PyThreadState *) pthread_getspecific(up.upt_save_key));
}
void gil_real_release() {
pthread_setspecific(up.upt_save_key, (void *) PyThreadState_Swap(NULL));
PyEval_ReleaseLock();
}
void gil_fake_get() {}
void gil_fake_release() {}