X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcthread.h;h=3a4036f6459ee1c5a3d8a0742fe6fd3f8bf80ab1;hb=196824372226561334cd638d6471267cbffb354c;hp=06becee09d32015feba4500786eb995d27ede943;hpb=67ead87b5688a88f997ed02252625e1ebb882de4;p=silc.git diff --git a/lib/silcutil/silcthread.h b/lib/silcutil/silcthread.h index 06becee0..3a4036f6 100644 --- a/lib/silcutil/silcthread.h +++ b/lib/silcutil/silcthread.h @@ -1,16 +1,15 @@ /* silcmutex.h - + Author: Pekka Riikonen - - Copyright (C) 2001 Pekka Riikonen - + + Copyright (C) 2001 - 2005 Pekka Riikonen + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - + the Free Software Foundation; version 2 of the License. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -24,7 +23,7 @@ * * Interface for SILC Thread implementation. This is platform independent * interface of threads for applications that need concurrent execution - * with the application's main thread. The threads created with this + * with the application's main thread. The threads created with this * interface executes concurrently with the calling thread. * ***/ @@ -37,7 +36,7 @@ /****s* silcutil/SilcThreadAPI/SilcThread * * NAME - * + * * typedef struct SilcThreadStruct *SilcThread; * * DESCRIPTION @@ -72,8 +71,8 @@ typedef void *(*SilcThreadStart)(void *context); * * SYNOPSIS * - * SilcThread silc_thread_create(SilcThreadStart start_func, - * void *context, bool waitable); + * SilcThread silc_thread_create(SilcThreadStart start_func, + * void *context, SilcBool waitable); * DESCRIPTION * * Creates a new thread. The `start_func' with `context' will be @@ -93,9 +92,13 @@ typedef void *(*SilcThreadStart)(void *context); * If the `waitable' is TRUE then another thread must always issue * silc_thread_wait to avoid memory leaks. * + * On Symbian Cleanup Stack is created and new Active Scheduler is + * installed automatically for the created thread. The thread also + * shares heap with the calling thread. + * ***/ SilcThread silc_thread_create(SilcThreadStart start_func, void *context, - bool waitable); + SilcBool waitable); /****f* silcutil/SilcThreadAPI/silc_thread_exit * @@ -131,7 +134,7 @@ SilcThread silc_thread_self(void); * * SYNOPSIS * - * bool silc_thread_wait(SilcThread thread, void **exit_value); + * SilcBool silc_thread_wait(SilcThread thread, void **exit_value); * * DESCRIPTION * @@ -143,6 +146,20 @@ SilcThread silc_thread_self(void); * FALSE value. * ***/ -bool silc_thread_wait(SilcThread thread, void **exit_value); +SilcBool silc_thread_wait(SilcThread thread, void **exit_value); + +/****f* silcutil/SilcThreadAPI/silc_thread_yield + * + * SYNOPSIS + * + * void silc_thread_yield(void); + * + * DESCRIPTION + * + * Yield the processor. The calling thread will yield the processor and + * give execution time for other threads, until its turn comes up again. + * + ***/ +void silc_thread_yield(void); #endif