30.11.2013 - New PICollection namespace, Android support, my own PIVector implementation

This commit is contained in:
peri4
2013-11-30 19:34:53 +04:00
parent ec5530053a
commit f50891b376
64 changed files with 5466 additions and 3392 deletions

View File

@@ -108,7 +108,11 @@ PIThread::~PIThread() {
piMonitor.threads--;
if (!running || thread == 0) return;
#ifndef WINDOWS
# ifdef ANDROID
pthread_kill(thread, SIGSTOP);
# else
pthread_cancel(thread);
# endif
#else
TerminateThread(thread, 0);
CloseHandle(thread);
@@ -169,7 +173,11 @@ void PIThread::terminate() {
if (thread == 0) return;
running = false;
#ifndef WINDOWS
# ifdef ANDROID
pthread_kill(thread, SIGSTOP);
# else
pthread_cancel(thread);
# endif
#else
TerminateThread(thread, 0);
CloseHandle(thread);
@@ -181,8 +189,10 @@ void PIThread::terminate() {
void * PIThread::thread_function(void * t) {
#ifndef WINDOWS
# ifndef ANDROID
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
# endif
#else
__PISetTimerResolution();
#endif
@@ -212,8 +222,10 @@ void * PIThread::thread_function(void * t) {
void * PIThread::thread_function_once(void * t) {
#ifndef WINDOWS
# ifndef ANDROID
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
# endif
#else
__PISetTimerResolution();
#endif