X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcstack.h;h=017a55d0b488fe461246e2fa32d9438d632ae49f;hp=c4415a17c15978d385ebddeb8ba70cce903ae372;hb=eff4c7d3a6068f5feccd41d423824ff6180f4dc5;hpb=89429cd0dc7e29b8284d5b6066f94719509ec885 diff --git a/lib/silcutil/silcstack.h b/lib/silcutil/silcstack.h index c4415a17..017a55d0 100644 --- a/lib/silcutil/silcstack.h +++ b/lib/silcutil/silcstack.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2003 - 2007 Pekka Riikonen + Copyright (C) 2003 - 2008 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 @@ -384,6 +384,42 @@ SilcUInt32 silc_stack_get_alignment(SilcStack stack); ***/ SilcBool silc_stack_purge(SilcStack stack); +/****f* silcutil/SilcStackAPI/silc_stack_set_global + * + * SYNOPSIS + * + * void silc_stack_set_global(SilcStack stack); + * + * DESCRIPTION + * + * Sets global SilcStack `stack' that can be retrieved at any time + * by using silc_stack_get_global. The global stack is global only + * to the current thread. Each thread can have their own global stack. + * If each thread must have own stack this must be called in each + * thread. If the global stack has been set already, new call will + * replace the old one. + * + * This routine is provided only as a convenience function to store + * program's or thread's stack in one global place. It is not mandatory + * to call this function in order to use SilcStack. + * + ***/ +void silc_stack_set_global(SilcStack stack); + +/****f* silcutil/SilcStackAPI/silc_stack_get_global + * + * SYNOPSIS + * + * SilcStack silc_stack_get_global(void); + * + * DESCRIPTION + * + * Returns the thread's global stack that was set by calling the + * silc_stack_set_global or NULL if global stack has not been set. + * + ***/ +SilcStack silc_stack_get_global(void); + #include "silcstack_i.h" #endif /* SILCSTACK_H */