Changeset 113 for trunk/desktop
- Timestamp:
- Nov 26, 2006, 1:36:45 PM (19 years ago)
- Location:
- trunk/desktop
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpobject.c
r110 r113 39 39 */ 40 40 #define INCL_DOS 41 #define INCL_DOSERRORS 42 #define INCL_DOSSEMAPHORES 41 43 #include <os2.h> 42 44 … … 45 47 46 48 #include <string.h> 49 #include "desktoptypes.h" 47 50 #include "wpobject.ih" 48 51 49 #include "desktoptypes.h"50 52 51 53 NOM_Scope gpointer NOMLINK impl_WPObject_wpAllocMem(WPObject* nomSelf, const CORBA_unsigned_long cbBytes, … … 96 98 NOM_Scope void NOMLINK impl_WPObject_nomInit(WPObject* nomSelf, CORBA_Environment *ev) 97 99 { 98 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 100 WPObjectData* nomThis=WPObjectGetData(nomSelf); 99 101 100 102 /* orbit-idl-c-stubs.c, VoyagerWriteProtoForParentCall line 84 */ … … 104 106 __FUNCTION__, nomSelf , nomSelf->mtab->nomClassName); 105 107 108 /* Initialize important data before letting subclasses do their stuff */ 109 //_gObjectMutex=g_mutex_new(); 110 if(NO_ERROR!=DosCreateMutexSem(NULL, &_gObjectMutex, 0, FALSE)) 111 { 112 g_error("Can't create a mutex for WPObject!"); 113 } 114 106 115 _wpInitData(nomSelf, ev); 107 116 } … … 109 118 NOM_Scope void NOMLINK impl_WPObject_nomUninit(WPObject* nomSelf, CORBA_Environment *ev) 110 119 { 111 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 120 WPObjectData* nomThis=WPObjectGetData(nomSelf); 112 121 113 122 _wpUnInitData(nomSelf, ev); 114 123 124 //g_mutex_free(_gObjectMutex); 125 DosCloseMutexSem(_gObjectMutex); 115 126 WPObject_nomUninit_parent(nomSelf, ev); 116 127 } … … 170 181 return NULLHANDLE; 171 182 } 183 184 NOM_Scope CORBA_unsigned_long NOMLINK impl_WPObject_wpRequestObjectMutexSem(WPObject* nomSelf, 185 const CORBA_unsigned_long ulReserved, CORBA_Environment *ev) 186 { 187 WPObjectData* nomThis=WPObjectGetData(nomSelf); 188 189 return DosRequestMutexSem(_gObjectMutex, -1L); 190 } 191 192 NOM_Scope CORBA_unsigned_long NOMLINK impl_WPObject_wpReleaseObjectMutexSem(WPObject* nomSelf, CORBA_Environment *ev) 193 { 194 WPObjectData* nomThis=WPObjectGetData(nomSelf); 195 return DosReleaseMutexSem(_gObjectMutex); 196 } -
trunk/desktop/idl/wpnativetypes.idl
r108 r113 38 38 native PPRIVFOLDERDATA; 39 39 native gint; 40 native PGMutex; /* For the object mutex */ 41 native HMUX; /* This one will be removed when a threaded glib is avail */ 42 native PGSList; /* For inuse list */ 40 43 41 44 #endif /* WPFOLDERTYPES_IDL_INCLUDED */ -
trunk/desktop/idl/wpobject.idl
r110 r113 56 56 gpointer wpAllocMem(in unsigned long cbBytes, 57 57 inout unsigned long prc); 58 boolean wpFreeMem(in gpointer pByte); 59 void wpInitData(); 60 void wpUnInitData(); 61 gpointer wpOpen(in gpointer ptrReserved, in unsigned long ulView, in gpointer ptrParams); 62 void wpLockObject(); 63 boolean wpUnlockObject(); 64 boolean wpObjectIsLocked(); 65 gpointer wpQueryIcon(); 66 unsigned long wpRequestObjectMutexSem(in unsigned long ulReserved); 67 unsigned long wpReleaseObjectMutexSem(); 58 68 59 boolean wpFreeMem(in gpointer pByte); 60 61 void wpInitData(); 62 void wpUnInitData(); 63 gpointer wpOpen(in gpointer ptrReserved, in unsigned long ulView, in gpointer ptrParams); 64 void wpLockObject(); 65 boolean wpUnlockObject(); 66 boolean wpObjectIsLocked(); 67 gpointer wpQueryIcon(); 68 69 /* Methods overriden by this class */ 69 70 NOMOVERRIDE(nomInit); 70 71 NOMOVERRIDE(nomUninit); 72 73 /* Instancce variables of this class. Theses are not 74 attributes. */ 71 75 NOMINSTANCEVAR(gint iLockCounter); 76 NOMINSTANCEVAR(HMUX gObjectMutex); 77 NOMINSTANCEVAR(PGSList glstObjectInUse); 78 72 79 }; 73 80 -
trunk/desktop/include/desktoptypes.h
r107 r113 2 2 #define DESKTOPTYPES_H_INCLUDED 3 3 4 4 /* Inuse lists */ 5 5 typedef struct _USEITEM 6 6 { … … 15 15 } MEMORYITEM, *PMEMORYITEM; 16 16 17 #define USAGE_MEMORY 1 17 18 18 #define USAGE_MEMORY 1 19 19 /* Misc types used with objects */ 20 typedef GSList *PGSList; 21 typedef GMutex *PGMutex; 22 23 /* Errors */ 20 24 #define NOMERROR_NOT_ENOUGH_MEMORY 8 21 25 -
trunk/desktop/src/vdesktop.c
r102 r113 65 65 g_message("We started...\n"); 66 66 67 #if 0 68 /* Initialize thread subsystem */ 69 if(!g_thread_supported()) 70 g_thread_init(NULL); 71 #endif 67 72 68 73 /* Create a window with a 'quit' button to terminate us */
Note:
See TracChangeset
for help on using the changeset viewer.