Added SILC Tls API for Thread-local storage. Added SilcTls
[crypto.git] / lib / silcutil / tests / test_silcthread.c
index d59ed4e043066bea2b2a6e3e131e8def680aa8db..19315701ad8697860d1ada1551d8aa1fbd9ea3b6 100644 (file)
@@ -6,7 +6,8 @@ SilcSchedule schedule;
 
 static void func(SilcSchedule schedule, void *context)
 {
-  SILC_LOG_DEBUG(("func: %d", (int)context));
+  silc_thread_tls_set(context);
+  SILC_LOG_DEBUG(("func: %d", (int)silc_thread_tls_get()));
   sleep(1);
 }