From 6d50671010b546e305f0f770f2ad4f0a8bff35c0 Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Tue, 9 Sep 2008 15:55:54 +0000 Subject: [PATCH] Added mz_proc_thread_self function for debug svn: r11609 --- src/mzscheme/src/mzrt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mzscheme/src/mzrt.c b/src/mzscheme/src/mzrt.c index 60954ddd7a..8832082806 100644 --- a/src/mzscheme/src/mzrt.c +++ b/src/mzscheme/src/mzrt.c @@ -147,6 +147,20 @@ struct mz_proc_thread { #endif }; +int mz_proc_thread_self() { +#ifdef WIN32 +#error !!!mz_proc_thread_id not implemented!!! +#else + return (int) pthread_self(); +#endif +} + +int mz_proc_thread_id(mz_proc_thread* thread) { + + return (int) thread->threadid; +} + + mz_proc_thread* mz_proc_thread_create(mz_proc_thread_start start_proc, void* data) { mz_proc_thread *thread = (mz_proc_thread*)malloc(sizeof(mz_proc_thread)); #ifdef WIN32