|
From: <cre...@us...> - 2007-10-28 00:14:17
|
Revision: 1760
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1760&view=rev
Author: creecode
Date: 2007-10-27 17:14:21 -0700 (Sat, 27 Oct 2007)
Log Message:
-----------
in initmainthread function removed old code; for Mac, removed pre-carbon code (A5)
Modified Paths:
--------------
Frontier/branches/IUDA_Desktop/Common/source/threads.c
Modified: Frontier/branches/IUDA_Desktop/Common/source/threads.c
===================================================================
--- Frontier/branches/IUDA_Desktop/Common/source/threads.c 2007-10-28 00:06:49 UTC (rev 1759)
+++ Frontier/branches/IUDA_Desktop/Common/source/threads.c 2007-10-28 00:14:21 UTC (rev 1760)
@@ -178,67 +178,67 @@
boolean initmainthread (void * hglobals) {
+ //
+ // 2007-10-27 creedon: removed old code
+ //
+ // for Mac, removed pre-carbon code (A5)
+ //
+
+ #ifdef MACVERSION
+
+ setthreadprocs (kApplicationThreadID, hglobals);
+
+ GetCurrentThread (&idmainthread);
+
+ return (true);
+
+ #endif // MACVERSION
- /*
- if (oserror (CreateThreadPool (kCooperativeThread, threadpoolsize, (Size) macmemoryconfig.minstacksize)))
- return (false);
- */
+ #ifdef WIN95VERSION
-#ifdef MACVERSION
- #if !TARGET_API_MAC_CARBON
- RememberA5 ();
- #endif /*for thread procs*/
+ #ifdef PIKE
+ #ifndef OPMLEDITOR
+ hsharedthreadglobals = CreateMutex (NULL, false, "Pike Thread Globals");
+ #else // OPMLEDITOR
+ hsharedthreadglobals = CreateMutex (NULL, false, "OPML Thread Globals");
+ #endif // !OPMLEDITOR
+ #else // !PIKE
+ hsharedthreadglobals = CreateMutex (NULL, false, "Frontier Thread Globals");
+ #endif //!PIKE
- setthreadprocs (kApplicationThreadID, hglobals);
+ ixlocalthreadglobals = TlsAlloc ();
+
+ if (ixlocalthreadglobals == (DWORD) -1) {
+
+ oserror (GetLastError ());
- GetCurrentThread (&idmainthread);
+ return (false);
+ }
- return (true);
-#endif
-
-#ifdef WIN95VERSION
-
-#ifdef PIKE
-#ifndef OPMLEDITOR
- hsharedthreadglobals = CreateMutex (NULL, false, "Pike Thread Globals");
-#else // OPMLEDITOR
- hsharedthreadglobals = CreateMutex (NULL, false, "OPML Thread Globals");
-#endif // !OPMLEDITOR
-#else // !PIKE
- hsharedthreadglobals = CreateMutex (NULL, false, "Frontier Thread Globals");
-#endif //!PIKE
-
- ixlocalthreadglobals = TlsAlloc ();
+ if (!TlsSetValue (ixlocalthreadglobals, hglobals)) {
+
+ oserror (GetLastError ());
- if (ixlocalthreadglobals == (DWORD) -1) {
+ return (false);
+ }
- oserror (GetLastError ());
-
- return (false);
- }
-
- if (!TlsSetValue (ixlocalthreadglobals, hglobals)) {
+ (*threadcallbacks.swapincallback) (hglobals);
+
+ ixthreadglobalsgrabcount = TlsAlloc ();
- oserror (GetLastError ());
-
- return (false);
- }
+ TlsSetValue (ixthreadglobalsgrabcount, 0);
- (*threadcallbacks.swapincallback) (hglobals);
-
- ixthreadglobalsgrabcount = TlsAlloc ();
+ GLOBALgrabcount = 0;
- TlsSetValue (ixthreadglobalsgrabcount, 0);
+ idmainthread = GetCurrentThreadId ();
+
+ return (true);
- GLOBALgrabcount = 0;
+ #endif
- idmainthread = GetCurrentThreadId ();
+ } // initmainthread
- return (true);
-#endif
- } /*initmainthread*/
-
boolean inmainthread (void) {
#ifdef MACVERSION
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|