Wine, WineLib and "Programming Applications for Windows"
Last updated: 2001/1/18
Description
See the description of tlsdyn.
Wine tests
Winelib tests
- Compiles and links just fine.
- See tlsdyn.
Last updated: 2001/3/1
Description
Illustrates the dynamic allocation of thread local storage. The
tls proper is performed by the somelib library. The application
creates five threads which each call a method in somelib. This
method allocates some thread local storage for each thread.
Wine tests
Winelib tests
- Same as with Wine.
- You must remember to add '.' to LD_LIBRARY_PATH to run this application.
Tested API
- KERNEL32
CloseHandle, GetModuleHandleA, GetStartupInfoA, Sleep
- MSVCRT20
_XcptFilter, __getmainargs, __p__acmdln, __p__commode, __p__fmode, _beginthreadex, _controlfp, _except_handler3, _exit, _initterm, exit, sprintf
- SOMELIB
LoadResString
- USER32
DialogBoxParamA, EndDialog, GetDlgItem, GetWindowLongA, LoadIconA, MessageBoxA, SendMessageA, SetClassLongA
Last updated: 2001/3/1
Description
This application demonstrates the use of statically allocated
thread local storage. It displays a dialog box which allows you to
start new threads. Each thread sleeps for some time and then displays
how long it has been running. It knows how long it has been running
by comparing the current time with its start time as stored in a
thread local variable.
Wine tests
Winelib tests
- This application does not and will not work with WineLib. The reason
is that it depends on '__declspec(thread)' to declare a variable as
thread local storage variable. gcc does not support this notion and
thus such an application would have to be modified to use dynamically
allocated thread local storage. See the tlsdyn example.
Tested API
- KERNEL32
CloseHandle, GetModuleHandleA, GetProcessHeap, GetStartupInfoA, GetTickCount, HeapAlloc, HeapFree, Sleep
- MSVCRT20
_XcptFilter, __getmainargs, __p__acmdln, __p__commode, __p__fmode, _beginthreadex, _controlfp, _except_handler3, _exit, _initterm, exit, sprintf
- USER32
DialogBoxParamA, EndDialog, GetDlgItem, GetDlgItemInt, GetWindowLongA, LoadIconA, MessageBoxA, SendMessageA, SetClassLongA, SetDlgItemInt, SetFocus