ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Windows/util_windows.cpp
(Generate patch)

Comparing BasiliskII/src/Windows/util_windows.cpp (file contents):
Revision 1.1 by gbeauche, 2004-12-03T22:01:47Z vs.
Revision 1.2 by gbeauche, 2004-12-11T09:41:13Z

# Line 83 | Line 83 | int32 get_file_size( const char *path )
83          }
84          return(size);
85   }
86 +
87 +
88 + /*
89 + *  Thread wrappers
90 + */
91 +
92 + HANDLE create_thread(LPTHREAD_START_ROUTINE start_routine, void *arg)
93 + {
94 +        DWORD dwThreadId;
95 +        return CreateThread(NULL, 0, start_routine, arg, 0, &dwThreadId);
96 + }
97 +
98 + void wait_thread(HANDLE thread)
99 + {
100 +        WaitForSingleObject(thread, INFINITE);
101 +        CloseHandle(thread);
102 + }
103 +
104 + void kill_thread(HANDLE thread)
105 + {
106 +        TerminateThread(thread, 0);
107 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines