4 * Copyright 1996 Alexandre Julliard
17 #include "selectors.h"
21 #include "stackframe.h"
28 static BOOL32
THREAD_Signaled( K32OBJ
*obj
, DWORD thread_id
);
29 static BOOL32
THREAD_Satisfied( K32OBJ
*obj
, DWORD thread_id
);
30 static void THREAD_AddWait( K32OBJ
*obj
, DWORD thread_id
);
31 static void THREAD_RemoveWait( K32OBJ
*obj
, DWORD thread_id
);
32 static void THREAD_Destroy( K32OBJ
*obj
);
34 const K32OBJ_OPS THREAD_Ops
=
36 THREAD_Signaled
, /* signaled */
37 THREAD_Satisfied
, /* satisfied */
38 THREAD_AddWait
, /* add_wait */
39 THREAD_RemoveWait
, /* remove_wait */
42 THREAD_Destroy
/* destroy */
45 /* Is threading code initialized? */
46 BOOL32 THREAD_InitDone
= FALSE
;
48 /**********************************************************************
51 * Return a pointer to a thread object. The object count must be decremented
52 * when no longer used.
54 THDB
*THREAD_GetPtr( HANDLE32 handle
, DWORD access
, int *server_handle
)
56 return (THDB
*)HANDLE_GetObjPtr( PROCESS_Current(), handle
,
57 K32OBJ_THREAD
, access
, server_handle
);
61 /***********************************************************************
64 * Return the current thread THDB pointer.
66 THDB
*THREAD_Current(void)
68 if (!THREAD_InitDone
) return NULL
;
69 return (THDB
*)((char *)NtCurrentTeb() - (int)&((THDB
*)0)->teb
);
72 /***********************************************************************
75 BOOL32
THREAD_IsWin16( THDB
*thdb
)
77 if (!thdb
|| !thdb
->process
)
81 TDB
* pTask
= (TDB
*)GlobalLock16( thdb
->process
->task
);
82 return !pTask
|| pTask
->thdb
== thdb
;
86 /***********************************************************************
89 * Convert a thread id to a THDB, making sure it is valid.
91 THDB
*THREAD_IdToTHDB( DWORD id
)
95 if (!id
) return THREAD_Current();
96 thdb
= THREAD_ID_TO_THDB( id
);
97 if (!K32OBJ_IsValid( &thdb
->header
, K32OBJ_THREAD
))
99 /* Allow task handles to be used; convert to main thread */
102 TDB
*pTask
= (TDB
*)GlobalLock16( id
);
103 if (pTask
) return pTask
->thdb
;
106 SetLastError( ERROR_INVALID_PARAMETER
);
114 /***********************************************************************
117 * Add a thread to a queue.
119 void THREAD_AddQueue( THREAD_QUEUE
*queue
, THDB
*thread
)
121 THREAD_ENTRY
*entry
= HeapAlloc( SystemHeap
, HEAP_NO_SERIALIZE
,
125 entry
->thread
= thread
;
128 entry
->next
= (*queue
)->next
;
129 (*queue
)->next
= entry
;
131 else entry
->next
= entry
;
136 /***********************************************************************
139 * Remove a thread from a queue.
141 void THREAD_RemoveQueue( THREAD_QUEUE
*queue
, THDB
*thread
)
143 THREAD_ENTRY
*entry
= *queue
;
145 if (entry
->next
== entry
) /* Only one element in the queue */
147 assert( entry
->thread
== thread
);
153 while (entry
->next
->thread
!= thread
)
156 assert( entry
!= *queue
); /* Have we come all the way around? */
158 if ((next
= entry
->next
) == *queue
) *queue
= entry
;
159 entry
->next
= entry
->next
->next
;
160 entry
= next
; /* This is the one we want to free */
162 HeapFree( SystemHeap
, 0, entry
);
167 /***********************************************************************
170 THDB
*THREAD_Create( PDB32
*pdb
, DWORD stack_size
, BOOL32 alloc_stack16
,
171 int *server_thandle
, int *server_phandle
,
172 LPTHREAD_START_ROUTINE start_addr
, LPVOID param
)
177 THDB
*thdb
= HeapAlloc( SystemHeap
, HEAP_ZERO_MEMORY
, sizeof(THDB
) );
178 if (!thdb
) return NULL
;
179 thdb
->header
.type
= K32OBJ_THREAD
;
180 thdb
->header
.refcount
= 1;
182 thdb
->teb
.except
= (void *)-1;
183 thdb
->teb
.htask16
= 0; /* FIXME */
184 thdb
->teb
.self
= &thdb
->teb
;
185 thdb
->teb
.tls_ptr
= thdb
->tls_array
;
186 thdb
->teb
.process
= pdb
;
187 thdb
->wait_list
= &thdb
->wait_struct
;
188 thdb
->exit_code
= 0x103; /* STILL_ACTIVE */
189 thdb
->entry_point
= start_addr
;
190 thdb
->entry_arg
= param
;
193 /* Allocate the stack */
196 * If stacksize smaller than 1 MB, allocate 1MB
197 * (one program wanted only 10 kB, which is recommendable, but some WINE
198 * functions, noteably in the files subdir, push HUGE structures and
199 * arrays on the stack. They probably shouldn't.)
200 * If stacksize larger than 16 MB, warn the user. (We could shrink the stack
201 * but this could give more or less unexplainable crashes.)
203 if (stack_size
<1024*1024)
204 stack_size
= 1024 * 1024;
205 if (stack_size
>= 16*1024*1024)
206 WARN(thread
,"Thread stack size is %ld MB.\n",stack_size
/1024/1024);
207 thdb
->stack_base
= VirtualAlloc(NULL
,
208 stack_size
+ (alloc_stack16
? 0x10000 : 0),
209 MEM_COMMIT
, PAGE_EXECUTE_READWRITE
);
210 if (!thdb
->stack_base
) goto error
;
211 /* Set a guard page at the bottom of the stack */
212 VirtualProtect( thdb
->stack_base
, 1, PAGE_EXECUTE_READWRITE
| PAGE_GUARD
,
214 thdb
->teb
.stack_top
= (char *)thdb
->stack_base
+ stack_size
;
215 thdb
->teb
.stack_low
= thdb
->stack_base
;
216 thdb
->exit_stack
= thdb
->teb
.stack_top
;
218 /* Allocate the TEB selector (%fs register) */
220 thdb
->teb_sel
= SELECTOR_AllocBlock( &thdb
->teb
, 0x1000, SEGMENT_DATA
,
222 if (!thdb
->teb_sel
) goto error
;
224 /* Allocate the 16-bit stack selector */
228 thdb
->teb
.stack_sel
= SELECTOR_AllocBlock( thdb
->teb
.stack_top
,
229 0x10000, SEGMENT_DATA
,
231 if (!thdb
->teb
.stack_sel
) goto error
;
232 thdb
->cur_stack
= PTR_SEG_OFF_TO_SEGPTR( thdb
->teb
.stack_sel
,
233 0x10000 - sizeof(STACK16FRAME
) );
236 /* Allocate the event */
238 if (!(thdb
->event
= EVENT_Create( TRUE
, FALSE
))) goto error
;
240 /* Create the thread socket */
242 if (CLIENT_NewThread( thdb
, server_thandle
, server_phandle
)) goto error
;
244 /* Add thread to process's list of threads */
246 THREAD_AddQueue( &pdb
->thread_list
, thdb
);
248 /* Initialize the thread context */
252 thdb
->pcontext
= &thdb
->context
;
253 thdb
->context
.SegCs
= cs
;
254 thdb
->context
.SegDs
= ds
;
255 thdb
->context
.SegEs
= ds
;
256 thdb
->context
.SegGs
= ds
;
257 thdb
->context
.SegSs
= ds
;
258 thdb
->context
.SegFs
= thdb
->teb_sel
;
259 thdb
->context
.Eip
= (DWORD
)start_addr
;
260 thdb
->context
.Esp
= (DWORD
)thdb
->teb
.stack_top
;
265 if (thdb
->socket
!= -1) close( thdb
->socket
);
266 if (thdb
->event
) K32OBJ_DecCount( thdb
->event
);
267 if (thdb
->teb
.stack_sel
) SELECTOR_FreeBlock( thdb
->teb
.stack_sel
, 1 );
268 if (thdb
->teb_sel
) SELECTOR_FreeBlock( thdb
->teb_sel
, 1 );
269 if (thdb
->stack_base
) VirtualFree( thdb
->stack_base
, 0, MEM_RELEASE
);
270 HeapFree( SystemHeap
, 0, thdb
);
275 /***********************************************************************
278 static BOOL32
THREAD_Signaled( K32OBJ
*obj
, DWORD thread_id
)
280 THDB
*thdb
= (THDB
*)obj
;
281 assert( obj
->type
== K32OBJ_THREAD
);
282 return K32OBJ_OPS( thdb
->event
)->signaled( thdb
->event
, thread_id
);
286 /***********************************************************************
289 * Wait on this object has been satisfied.
291 static BOOL32
THREAD_Satisfied( K32OBJ
*obj
, DWORD thread_id
)
293 THDB
*thdb
= (THDB
*)obj
;
294 assert( obj
->type
== K32OBJ_THREAD
);
295 return K32OBJ_OPS( thdb
->event
)->satisfied( thdb
->event
, thread_id
);
299 /***********************************************************************
302 * Add thread to object wait queue.
304 static void THREAD_AddWait( K32OBJ
*obj
, DWORD thread_id
)
306 THDB
*thdb
= (THDB
*)obj
;
307 assert( obj
->type
== K32OBJ_THREAD
);
308 return K32OBJ_OPS( thdb
->event
)->add_wait( thdb
->event
, thread_id
);
312 /***********************************************************************
315 * Remove thread from object wait queue.
317 static void THREAD_RemoveWait( K32OBJ
*obj
, DWORD thread_id
)
319 THDB
*thdb
= (THDB
*)obj
;
320 assert( obj
->type
== K32OBJ_THREAD
);
321 return K32OBJ_OPS( thdb
->event
)->remove_wait( thdb
->event
, thread_id
);
325 /***********************************************************************
328 static void THREAD_Destroy( K32OBJ
*ptr
)
330 THDB
*thdb
= (THDB
*)ptr
;
332 assert( ptr
->type
== K32OBJ_THREAD
);
333 ptr
->type
= K32OBJ_UNKNOWN
;
335 /* Free the associated memory */
339 /* Check if we are deleting the current thread */
342 if (fs
== thdb
->teb_sel
)
349 close( thdb
->socket
);
350 K32OBJ_DecCount( thdb
->event
);
351 SELECTOR_FreeBlock( thdb
->teb_sel
, 1 );
352 if (thdb
->teb
.stack_sel
) SELECTOR_FreeBlock( thdb
->teb
.stack_sel
, 1 );
353 HeapFree( SystemHeap
, 0, thdb
);
358 /***********************************************************************
361 * Start execution of a newly created thread. Does not return.
363 void THREAD_Start( THDB
*thdb
)
365 LPTHREAD_START_ROUTINE func
= (LPTHREAD_START_ROUTINE
)thdb
->entry_point
;
366 assert( THREAD_Current() == thdb
);
368 MODULE_InitializeDLLs( thdb
->process
, 0, DLL_THREAD_ATTACH
, NULL
);
369 ExitThread( func( thdb
->entry_arg
) );
373 /***********************************************************************
374 * CreateThread (KERNEL32.63)
376 HANDLE32 WINAPI
CreateThread( SECURITY_ATTRIBUTES
*sa
, DWORD stack
,
377 LPTHREAD_START_ROUTINE start
, LPVOID param
,
378 DWORD flags
, LPDWORD id
)
380 int server_handle
= -1;
381 HANDLE32 handle
= INVALID_HANDLE_VALUE32
;
382 BOOL32 inherit
= (sa
&& (sa
->nLength
>=sizeof(*sa
)) && sa
->bInheritHandle
);
384 THDB
*thread
= THREAD_Create( PROCESS_Current(), stack
,
385 TRUE
, &server_handle
, NULL
, start
, param
);
386 if (!thread
) return INVALID_HANDLE_VALUE32
;
387 handle
= HANDLE_Alloc( PROCESS_Current(), &thread
->header
,
388 THREAD_ALL_ACCESS
, inherit
, server_handle
);
389 if (handle
== INVALID_HANDLE_VALUE32
) goto error
;
390 if (SYSDEPS_SpawnThread( thread
) == -1) goto error
;
391 if (id
) *id
= THDB_TO_THREAD_ID( thread
);
395 if (handle
!= INVALID_HANDLE_VALUE32
) CloseHandle( handle
);
396 K32OBJ_DecCount( &thread
->header
);
397 return INVALID_HANDLE_VALUE32
;
401 /***********************************************************************
402 * ExitThread [KERNEL32.215] Ends a thread
407 void WINAPI
ExitThread(
408 DWORD code
) /* [in] Exit code for this thread */
410 THDB
*thdb
= THREAD_Current();
413 /* Remove thread from process's list */
414 THREAD_RemoveQueue( &thdb
->process
->thread_list
, thdb
);
416 MODULE_InitializeDLLs( thdb
->process
, 0, DLL_THREAD_DETACH
, NULL
);
419 thdb
->exit_code
= code
;
420 EVENT_Set( thdb
->event
);
422 /* Abandon all owned mutexes */
423 while (thdb
->mutex_list
) MUTEX_Abandon( thdb
->mutex_list
);
425 /* FIXME: should free the stack somehow */
427 /* FIXME: We cannot do this; once the current thread is destroyed,
428 synchronization primitives do not work properly. */
429 K32OBJ_DecCount( &thdb
->header
);
431 /* Completely unlock the system lock just in case */
432 count
= SYSTEM_LOCK_COUNT();
433 while (count
--) SYSTEM_UNLOCK();
434 SYSDEPS_ExitThread();
438 /***********************************************************************
439 * GetCurrentThread [KERNEL32.200] Gets pseudohandle for current thread
442 * Pseudohandle for the current thread
444 HANDLE32 WINAPI
GetCurrentThread(void)
446 return CURRENT_THREAD_PSEUDOHANDLE
;
450 /***********************************************************************
451 * GetCurrentThreadId [KERNEL32.201] Returns thread identifier.
454 * Thread identifier of calling thread
456 DWORD WINAPI
GetCurrentThreadId(void)
458 return THDB_TO_THREAD_ID( THREAD_Current() );
462 /**********************************************************************
463 * GetLastError [KERNEL.148] [KERNEL32.227] Returns last-error code.
466 * Calling thread's last error code value.
468 DWORD WINAPI
GetLastError(void)
470 THDB
*thread
= THREAD_Current();
471 DWORD ret
= thread
->last_error
;
472 TRACE(thread
,"0x%lx\n",ret
);
477 /**********************************************************************
478 * SetLastError [KERNEL.147] [KERNEL32.497] Sets the last-error code.
483 void WINAPI
SetLastError(
484 DWORD error
) /* [in] Per-thread error code */
486 THDB
*thread
= THREAD_Current();
487 /* This one must work before we have a thread (FIXME) */
489 TRACE(thread
,"%p error=0x%lx\n",thread
,error
);
492 thread
->last_error
= error
;
496 /**********************************************************************
497 * SetLastErrorEx [USER32.485] Sets the last-error code.
502 void WINAPI
SetLastErrorEx(
503 DWORD error
, /* [in] Per-thread error code */
504 DWORD type
) /* [in] Error type */
506 TRACE(thread
, "(0x%08lx, 0x%08lx)\n", error
,type
);
513 /* Fall through for now */
515 FIXME(thread
, "(error=%08lx, type=%08lx): Unhandled type\n", error
,type
);
518 SetLastError( error
);
522 /**********************************************************************
525 DWORD
THREAD_TlsAlloc(THDB
*thread
)
527 DWORD i
, mask
, ret
= 0;
528 DWORD
*bits
= thread
->process
->tls_bits
;
529 EnterCriticalSection( &thread
->process
->crit_section
);
530 if (*bits
== 0xffffffff)
534 if (*bits
== 0xffffffff)
536 LeaveCriticalSection( &thread
->process
->crit_section
);
537 SetLastError( ERROR_NO_MORE_ITEMS
);
541 for (i
= 0, mask
= 1; i
< 32; i
++, mask
<<= 1) if (!(*bits
& mask
)) break;
543 LeaveCriticalSection( &thread
->process
->crit_section
);
548 /**********************************************************************
549 * TlsAlloc [KERNEL32.530] Allocates a TLS index.
551 * Allocates a thread local storage index
555 * Failure: 0xFFFFFFFF
557 DWORD WINAPI
TlsAlloc(void)
559 return THREAD_TlsAlloc(THREAD_Current());
563 /**********************************************************************
564 * TlsFree [KERNEL32.531] Releases a TLS index.
566 * Releases a thread local storage index, making it available for reuse
572 BOOL32 WINAPI
TlsFree(
573 DWORD index
) /* [in] TLS Index to free */
576 THDB
*thread
= THREAD_Current();
577 DWORD
*bits
= thread
->process
->tls_bits
;
580 SetLastError( ERROR_INVALID_PARAMETER
);
583 EnterCriticalSection( &thread
->process
->crit_section
);
584 if (index
>= 32) bits
++;
585 mask
= (1 << (index
& 31));
586 if (!(*bits
& mask
)) /* already free? */
588 LeaveCriticalSection( &thread
->process
->crit_section
);
589 SetLastError( ERROR_INVALID_PARAMETER
);
593 thread
->tls_array
[index
] = 0;
594 /* FIXME: should zero all other thread values */
595 LeaveCriticalSection( &thread
->process
->crit_section
);
600 /**********************************************************************
601 * TlsGetValue [KERNEL32.532] Gets value in a thread's TLS slot
604 * Success: Value stored in calling thread's TLS slot for index
605 * Failure: 0 and GetLastError returns NO_ERROR
607 LPVOID WINAPI
TlsGetValue(
608 DWORD index
) /* [in] TLS index to retrieve value for */
610 THDB
*thread
= THREAD_Current();
613 SetLastError( ERROR_INVALID_PARAMETER
);
616 SetLastError( ERROR_SUCCESS
);
617 return thread
->tls_array
[index
];
621 /**********************************************************************
622 * TlsSetValue [KERNEL32.533] Stores a value in the thread's TLS slot.
628 BOOL32 WINAPI
TlsSetValue(
629 DWORD index
, /* [in] TLS index to set value for */
630 LPVOID value
) /* [in] Value to be stored */
632 THDB
*thread
= THREAD_Current();
635 SetLastError( ERROR_INVALID_PARAMETER
);
638 thread
->tls_array
[index
] = value
;
643 /***********************************************************************
644 * SetThreadContext [KERNEL32.670] Sets context of thread.
650 BOOL32 WINAPI
SetThreadContext(
651 HANDLE32 handle
, /* [in] Handle to thread with context */
652 CONTEXT
*context
) /* [out] Address of context structure */
654 THDB
*thread
= THREAD_GetPtr( handle
, THREAD_GET_CONTEXT
, NULL
);
655 if (!thread
) return FALSE
;
656 *context
= thread
->context
;
657 K32OBJ_DecCount( &thread
->header
);
661 /***********************************************************************
662 * GetThreadContext [KERNEL32.294] Retrieves context of thread.
668 BOOL32 WINAPI
GetThreadContext(
669 HANDLE32 handle
, /* [in] Handle to thread with context */
670 CONTEXT
*context
) /* [out] Address of context structure */
672 THDB
*thread
= THREAD_GetPtr( handle
, THREAD_GET_CONTEXT
, NULL
);
673 if (!thread
) return FALSE
;
674 *context
= thread
->context
;
675 K32OBJ_DecCount( &thread
->header
);
680 /**********************************************************************
681 * GetThreadPriority [KERNEL32.296] Returns priority for thread.
684 * Success: Thread's priority level.
685 * Failure: THREAD_PRIORITY_ERROR_RETURN
687 INT32 WINAPI
GetThreadPriority(
688 HANDLE32 hthread
) /* [in] Handle to thread */
693 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
694 return THREAD_PRIORITY_ERROR_RETURN
;
695 ret
= thread
->delta_priority
;
696 K32OBJ_DecCount( &thread
->header
);
701 /**********************************************************************
702 * SetThreadPriority [KERNEL32.514] Sets priority for thread.
708 BOOL32 WINAPI
SetThreadPriority(
709 HANDLE32 hthread
, /* [in] Handle to thread */
710 INT32 priority
) /* [in] Thread priority level */
714 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_SET_INFORMATION
, NULL
)))
716 thread
->delta_priority
= priority
;
717 K32OBJ_DecCount( &thread
->header
);
722 /**********************************************************************
723 * TerminateThread [KERNEL32.685] Terminates a thread
729 BOOL32 WINAPI
TerminateThread(
730 HANDLE32 handle
, /* [in] Handle to thread */
731 DWORD exitcode
) /* [in] Exit code for thread */
737 if (!(thread
= THREAD_GetPtr( handle
, THREAD_TERMINATE
, &server_handle
)))
739 ret
= !CLIENT_TerminateThread( server_handle
, exitcode
);
740 K32OBJ_DecCount( &thread
->header
);
745 /**********************************************************************
746 * GetExitCodeThread [KERNEL32.???] Gets termination status of thread.
752 BOOL32 WINAPI
GetExitCodeThread(
753 HANDLE32 hthread
, /* [in] Handle to thread */
754 LPDWORD exitcode
) /* [out] Address to receive termination status */
759 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, &server_handle
)))
761 if (server_handle
!= -1)
763 struct get_thread_info_reply info
;
764 CLIENT_GetThreadInfo( server_handle
, &info
);
765 if (exitcode
) *exitcode
= info
.exit_code
;
767 else if (exitcode
) *exitcode
= thread
->exit_code
;
768 K32OBJ_DecCount( &thread
->header
);
773 /**********************************************************************
774 * ResumeThread [KERNEL32.587] Resumes a thread.
776 * Decrements a thread's suspend count. When count is zero, the
777 * execution of the thread is resumed.
780 * Success: Previous suspend count
781 * Failure: 0xFFFFFFFF
784 DWORD WINAPI
ResumeThread(
785 HANDLE32 hthread
) /* [in] Indentifies thread to restart */
791 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
794 WARN(thread
, "Invalid thread handle\n");
797 if ((oldcount
= thread
->suspend_count
) != 0)
799 if (!--thread
->suspend_count
)
801 if (kill(thread
->unix_pid
, SIGCONT
))
803 WARN(thread
, "Unable to CONTinue pid: %04x\n",
805 oldcount
= 0xFFFFFFFF;
809 K32OBJ_DecCount(&thread
->header
);
815 /**********************************************************************
816 * SuspendThread [KERNEL32.681] Suspends a thread.
819 * Success: Previous suspend count
820 * Failure: 0xFFFFFFFF
822 DWORD WINAPI
SuspendThread(
823 HANDLE32 hthread
) /* [in] Handle to the thread */
829 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
832 WARN(thread
, "Invalid thread handle\n");
836 if (!(oldcount
= thread
->suspend_count
))
838 if (thread
->unix_pid
== getpid())
839 WARN(thread
, "Attempting to suspend myself\n" );
842 if (kill(thread
->unix_pid
, SIGSTOP
))
844 WARN(thread
, "Unable to STOP pid: %04x\n",
846 oldcount
= 0xFFFFFFFF;
848 else thread
->suspend_count
++;
851 else thread
->suspend_count
++;
852 K32OBJ_DecCount( &thread
->header
);
859 /**********************************************************************
860 * GetThreadTimes [KERNEL32.???] Obtains timing information.
863 * What are the fields where these values are stored?
869 BOOL32 WINAPI
GetThreadTimes(
870 HANDLE32 thread
, /* [in] Specifies the thread of interest */
871 LPFILETIME creationtime
, /* [out] When the thread was created */
872 LPFILETIME exittime
, /* [out] When the thread was destroyed */
873 LPFILETIME kerneltime
, /* [out] Time thread spent in kernel mode */
874 LPFILETIME usertime
) /* [out] Time thread spent in user mode */
876 FIXME(thread
,"(0x%08x): stub\n",thread
);
877 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
882 /**********************************************************************
883 * AttachThreadInput [KERNEL32.8] Attaches input of 1 thread to other
885 * Attaches the input processing mechanism of one thread to that of
892 BOOL32 WINAPI
AttachThreadInput(
893 DWORD idAttach
, /* [in] Thread to attach */
894 DWORD idAttachTo
, /* [in] Thread to attach to */
895 BOOL32 fAttach
) /* [in] Attach or detach */
899 FIXME(thread
, "(0x%08lx,0x%08lx,%d): stub\n",idAttach
,idAttachTo
,fAttach
);
900 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
912 /**********************************************************************
913 * VWin32_BoostThreadGroup [KERNEL.535]
915 VOID WINAPI
VWin32_BoostThreadGroup( DWORD threadId
, INT32 boost
)
917 FIXME(thread
, "(0x%08lx,%d): stub\n", threadId
, boost
);
920 /**********************************************************************
921 * VWin32_BoostThreadStatic [KERNEL.536]
923 VOID WINAPI
VWin32_BoostThreadStatic( DWORD threadId
, INT32 boost
)
925 FIXME(thread
, "(0x%08lx,%d): stub\n", threadId
, boost
);