equal
deleted
inserted
replaced
7711 |
7711 |
7712 %{ |
7712 %{ |
7713 extern void *__getHInstance(); |
7713 extern void *__getHInstance(); |
7714 |
7714 |
7715 RETURN (__MKEXTERNALADDRESS(__getHInstance())); |
7715 RETURN (__MKEXTERNALADDRESS(__getHInstance())); |
7716 %} |
7716 %}. |
7717 |
7717 |
7718 " |
7718 " |
7719 Win32OperatingSystem hInstance |
7719 Win32OperatingSystem hInstance |
7720 " |
7720 " |
7721 ! |
7721 ! |
7951 c_handle = CreateMutexA(c_descr, c_initialOwner, c_name); |
7951 c_handle = CreateMutexA(c_descr, c_initialOwner, c_name); |
7952 __externalAddressVal(handle) = c_handle; |
7952 __externalAddressVal(handle) = c_handle; |
7953 RETURN(handle); |
7953 RETURN(handle); |
7954 } |
7954 } |
7955 badArg: ; |
7955 badArg: ; |
7956 %} |
7956 %}. |
7957 "/ <apicall: handle "CreateMutexA" (lpstr bool lpstr) module: "kernel32.dll" > |
7957 "/ <apicall: handle "CreateMutexA" (lpstr bool lpstr) module: "kernel32.dll" > |
7958 ^ self primitiveFailed |
7958 ^ self primitiveFailed |
7959 |
7959 |
7960 "Modified: / 03-08-2010 / 16:59:26 / cg" |
7960 "Modified: / 03-08-2010 / 16:59:26 / cg" |
7961 ! |
7961 ! |
7988 c_handle = OpenMutexA(c_descr, c_initialOwner, c_name); |
7988 c_handle = OpenMutexA(c_descr, c_initialOwner, c_name); |
7989 __externalAddressVal(handle) = c_handle; |
7989 __externalAddressVal(handle) = c_handle; |
7990 RETURN(handle); |
7990 RETURN(handle); |
7991 } |
7991 } |
7992 badArg: ; |
7992 badArg: ; |
7993 %} |
7993 %}. |
7994 "/ <apicall: handle "OpenMutexA" (lpstr bool lpstr) module: "kernel32.dll" > |
7994 "/ <apicall: handle "OpenMutexA" (lpstr bool lpstr) module: "kernel32.dll" > |
7995 ^ self primitiveFailed |
7995 ^ self primitiveFailed |
7996 |
7996 |
7997 "Modified: / 03-08-2010 / 16:59:11 / cg" |
7997 "Modified: / 03-08-2010 / 16:59:11 / cg" |
7998 ! |
7998 ! |
8007 BOOL _ret; |
8007 BOOL _ret; |
8008 |
8008 |
8009 _ret = ReleaseMutex(_handle); |
8009 _ret = ReleaseMutex(_handle); |
8010 RETURN(_ret == 0 ? false : true); |
8010 RETURN(_ret == 0 ? false : true); |
8011 } |
8011 } |
8012 %} |
8012 %}. |
8013 "/ <apicall: bool "ReleaseMutex" (handle) module: "kernel32.dll" > |
8013 "/ <apicall: bool "ReleaseMutex" (handle) module: "kernel32.dll" > |
8014 ^ self primitiveFailed |
8014 ^ self primitiveFailed |
8015 |
8015 |
8016 "Modified: / 03-08-2010 / 16:59:55 / cg" |
8016 "Modified: / 03-08-2010 / 16:59:55 / cg" |
8017 ! |
8017 ! |
8031 |
8031 |
8032 _ret = ReleaseMutex(_handle); |
8032 _ret = ReleaseMutex(_handle); |
8033 RETURN( __mkSmallInteger(_ret)); |
8033 RETURN( __mkSmallInteger(_ret)); |
8034 } |
8034 } |
8035 } |
8035 } |
8036 %} |
8036 %}. |
8037 "/ <apicall: dword "WaitForSingleObject" (handle dword) module: "kernel32.dll" > |
8037 "/ <apicall: dword "WaitForSingleObject" (handle dword) module: "kernel32.dll" > |
8038 ^ self primitiveFailed |
8038 ^ self primitiveFailed |
8039 |
8039 |
8040 "Modified: / 03-08-2010 / 17:00:02 / cg" |
8040 "Modified: / 03-08-2010 / 17:00:02 / cg" |
8041 ! |
8041 ! |
8272 // console_printf("getenv() -> %"_lx_"\n", (INT)ret); |
8272 // console_printf("getenv() -> %"_lx_"\n", (INT)ret); |
8273 } |
8273 } |
8274 RETURN (ret); |
8274 RETURN (ret); |
8275 |
8275 |
8276 badArgument:; |
8276 badArgument:; |
8277 %} |
8277 %}. |
8278 . |
|
8279 ^ nil |
8278 ^ nil |
8280 |
8279 |
8281 " |
8280 " |
8282 OperatingSystem getEnvironment:'PATH' |
8281 OperatingSystem getEnvironment:'PATH' |
8283 " |
8282 " |
8750 ! |
8749 ! |
8751 |
8750 |
8752 getNumberOfProcessors |
8751 getNumberOfProcessors |
8753 "answer the number of physical processors in the system" |
8752 "answer the number of physical processors in the system" |
8754 |
8753 |
8755 %{ |
8754 %{ |
8756 SYSTEM_INFO sInfo; |
8755 SYSTEM_INFO sInfo; |
8757 GetSystemInfo(&sInfo); |
8756 GetSystemInfo(&sInfo); |
8758 |
8757 |
8759 return __mkSmallInteger(sInfo.dwNumberOfProcessors); |
8758 return __mkSmallInteger(sInfo.dwNumberOfProcessors); |
8760 %}. |
8759 %}. |
8761 |
8760 |
8762 " |
8761 " |
8763 self getNumberOfProcessors |
8762 self getNumberOfProcessors |
8764 " |
8763 " |
8765 ! |
8764 ! |
8771 |
8770 |
8772 int pid = 0; |
8771 int pid = 0; |
8773 |
8772 |
8774 pid = GetCurrentProcessId() & 0x3FFFFFFF; |
8773 pid = GetCurrentProcessId() & 0x3FFFFFFF; |
8775 RETURN ( __mkSmallInteger(pid) ); |
8774 RETURN ( __mkSmallInteger(pid) ); |
8776 %} |
8775 %}. |
8777 " |
8776 " |
8778 OperatingSystem getProcessId |
8777 OperatingSystem getProcessId |
8779 " |
8778 " |
8780 ! |
8779 ! |
8781 |
8780 |
9166 |
9165 |
9167 int pid = 0; |
9166 int pid = 0; |
9168 |
9167 |
9169 pid = GetCurrentThreadId() & 0x3FFFFFFF; |
9168 pid = GetCurrentThreadId() & 0x3FFFFFFF; |
9170 RETURN ( __mkSmallInteger(pid) ); |
9169 RETURN ( __mkSmallInteger(pid) ); |
9171 %} |
9170 %}. |
9172 " |
9171 " |
9173 OperatingSystem getThreadId |
9172 OperatingSystem getThreadId |
9174 " |
9173 " |
9175 ! |
9174 ! |
9176 |
9175 |