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
.flags
= (pdb
->flags
& PDB32_WIN16_PROC
)? 0 : TEBF_WIN32
;
186 thdb
->teb
.tls_ptr
= thdb
->tls_array
;
187 thdb
->teb
.process
= pdb
;
188 thdb
->wait_list
= &thdb
->wait_struct
;
189 thdb
->exit_code
= 0x103; /* STILL_ACTIVE */
190 thdb
->entry_point
= start_addr
;
191 thdb
->entry_arg
= param
;
194 /* Allocate the stack */
197 * If stacksize smaller than 1 MB, allocate 1MB
198 * (one program wanted only 10 kB, which is recommendable, but some WINE
199 * functions, noteably in the files subdir, push HUGE structures and
200 * arrays on the stack. They probably shouldn't.)
201 * If stacksize larger than 16 MB, warn the user. (We could shrink the stack
202 * but this could give more or less unexplainable crashes.)
204 if (stack_size
<1024*1024)
205 stack_size
= 1024 * 1024;
206 if (stack_size
>= 16*1024*1024)
207 WARN(thread
,"Thread stack size is %ld MB.\n",stack_size
/1024/1024);
208 thdb
->stack_base
= VirtualAlloc(NULL
,
209 stack_size
+ (alloc_stack16
? 0x10000 : 0),
210 MEM_COMMIT
, PAGE_EXECUTE_READWRITE
);
211 if (!thdb
->stack_base
) goto error
;
212 /* Set a guard page at the bottom of the stack */
213 VirtualProtect( thdb
->stack_base
, 1, PAGE_EXECUTE_READWRITE
| PAGE_GUARD
,
215 thdb
->teb
.stack_top
= (char *)thdb
->stack_base
+ stack_size
;
216 thdb
->teb
.stack_low
= thdb
->stack_base
;
217 thdb
->exit_stack
= thdb
->teb
.stack_top
;
219 /* Allocate the TEB selector (%fs register) */
221 thdb
->teb_sel
= SELECTOR_AllocBlock( &thdb
->teb
, 0x1000, SEGMENT_DATA
,
223 if (!thdb
->teb_sel
) goto error
;
225 /* Allocate the 16-bit stack selector */
229 thdb
->teb
.stack_sel
= SELECTOR_AllocBlock( thdb
->teb
.stack_top
,
230 0x10000, SEGMENT_DATA
,
232 if (!thdb
->teb
.stack_sel
) goto error
;
233 thdb
->cur_stack
= PTR_SEG_OFF_TO_SEGPTR( thdb
->teb
.stack_sel
,
234 0x10000 - sizeof(STACK16FRAME
) );
237 /* Allocate the event */
239 if (!(thdb
->event
= EVENT_Create( TRUE
, FALSE
))) goto error
;
241 /* Create the thread socket */
243 if (CLIENT_NewThread( thdb
, server_thandle
, server_phandle
)) goto error
;
245 /* Add thread to process's list of threads */
247 THREAD_AddQueue( &pdb
->thread_list
, thdb
);
249 /* Initialize the thread context */
253 thdb
->pcontext
= &thdb
->context
;
254 thdb
->context
.SegCs
= cs
;
255 thdb
->context
.SegDs
= ds
;
256 thdb
->context
.SegEs
= ds
;
257 thdb
->context
.SegGs
= ds
;
258 thdb
->context
.SegSs
= ds
;
259 thdb
->context
.SegFs
= thdb
->teb_sel
;
260 thdb
->context
.Eip
= (DWORD
)start_addr
;
261 thdb
->context
.Esp
= (DWORD
)thdb
->teb
.stack_top
;
266 if (thdb
->socket
!= -1) close( thdb
->socket
);
267 if (thdb
->event
) K32OBJ_DecCount( thdb
->event
);
268 if (thdb
->teb
.stack_sel
) SELECTOR_FreeBlock( thdb
->teb
.stack_sel
, 1 );
269 if (thdb
->teb_sel
) SELECTOR_FreeBlock( thdb
->teb_sel
, 1 );
270 if (thdb
->stack_base
) VirtualFree( thdb
->stack_base
, 0, MEM_RELEASE
);
271 HeapFree( SystemHeap
, 0, thdb
);
276 /***********************************************************************
279 static BOOL32
THREAD_Signaled( K32OBJ
*obj
, DWORD thread_id
)
281 THDB
*thdb
= (THDB
*)obj
;
282 assert( obj
->type
== K32OBJ_THREAD
);
283 return K32OBJ_OPS( thdb
->event
)->signaled( thdb
->event
, thread_id
);
287 /***********************************************************************
290 * Wait on this object has been satisfied.
292 static BOOL32
THREAD_Satisfied( K32OBJ
*obj
, DWORD thread_id
)
294 THDB
*thdb
= (THDB
*)obj
;
295 assert( obj
->type
== K32OBJ_THREAD
);
296 return K32OBJ_OPS( thdb
->event
)->satisfied( thdb
->event
, thread_id
);
300 /***********************************************************************
303 * Add thread to object wait queue.
305 static void THREAD_AddWait( K32OBJ
*obj
, DWORD thread_id
)
307 THDB
*thdb
= (THDB
*)obj
;
308 assert( obj
->type
== K32OBJ_THREAD
);
309 return K32OBJ_OPS( thdb
->event
)->add_wait( thdb
->event
, thread_id
);
313 /***********************************************************************
316 * Remove thread from object wait queue.
318 static void THREAD_RemoveWait( K32OBJ
*obj
, DWORD thread_id
)
320 THDB
*thdb
= (THDB
*)obj
;
321 assert( obj
->type
== K32OBJ_THREAD
);
322 return K32OBJ_OPS( thdb
->event
)->remove_wait( thdb
->event
, thread_id
);
326 /***********************************************************************
329 static void THREAD_Destroy( K32OBJ
*ptr
)
331 THDB
*thdb
= (THDB
*)ptr
;
333 assert( ptr
->type
== K32OBJ_THREAD
);
334 ptr
->type
= K32OBJ_UNKNOWN
;
336 /* Free the associated memory */
340 /* Check if we are deleting the current thread */
343 if (fs
== thdb
->teb_sel
)
350 close( thdb
->socket
);
351 K32OBJ_DecCount( thdb
->event
);
352 SELECTOR_FreeBlock( thdb
->teb_sel
, 1 );
353 if (thdb
->teb
.stack_sel
) SELECTOR_FreeBlock( thdb
->teb
.stack_sel
, 1 );
354 HeapFree( SystemHeap
, 0, thdb
);
359 /***********************************************************************
362 * Start execution of a newly created thread. Does not return.
364 void THREAD_Start( THDB
*thdb
)
366 LPTHREAD_START_ROUTINE func
= (LPTHREAD_START_ROUTINE
)thdb
->entry_point
;
367 assert( THREAD_Current() == thdb
);
369 MODULE_InitializeDLLs( thdb
->process
, 0, DLL_THREAD_ATTACH
, NULL
);
370 ExitThread( func( thdb
->entry_arg
) );
374 /***********************************************************************
375 * CreateThread (KERNEL32.63)
377 HANDLE32 WINAPI
CreateThread( SECURITY_ATTRIBUTES
*sa
, DWORD stack
,
378 LPTHREAD_START_ROUTINE start
, LPVOID param
,
379 DWORD flags
, LPDWORD id
)
381 int server_handle
= -1;
382 HANDLE32 handle
= INVALID_HANDLE_VALUE32
;
383 BOOL32 inherit
= (sa
&& (sa
->nLength
>=sizeof(*sa
)) && sa
->bInheritHandle
);
385 THDB
*thread
= THREAD_Create( PROCESS_Current(), stack
,
386 TRUE
, &server_handle
, NULL
, start
, param
);
387 if (!thread
) return INVALID_HANDLE_VALUE32
;
388 handle
= HANDLE_Alloc( PROCESS_Current(), &thread
->header
,
389 THREAD_ALL_ACCESS
, inherit
, server_handle
);
390 if (handle
== INVALID_HANDLE_VALUE32
) goto error
;
391 if (SYSDEPS_SpawnThread( thread
) == -1) goto error
;
392 if (id
) *id
= THDB_TO_THREAD_ID( thread
);
396 if (handle
!= INVALID_HANDLE_VALUE32
) CloseHandle( handle
);
397 K32OBJ_DecCount( &thread
->header
);
398 return INVALID_HANDLE_VALUE32
;
402 /***********************************************************************
403 * ExitThread [KERNEL32.215] Ends a thread
408 void WINAPI
ExitThread(
409 DWORD code
) /* [in] Exit code for this thread */
411 THDB
*thdb
= THREAD_Current();
414 /* Remove thread from process's list */
415 THREAD_RemoveQueue( &thdb
->process
->thread_list
, thdb
);
417 MODULE_InitializeDLLs( thdb
->process
, 0, DLL_THREAD_DETACH
, NULL
);
420 thdb
->exit_code
= code
;
421 EVENT_Set( thdb
->event
);
423 /* Abandon all owned mutexes */
424 while (thdb
->mutex_list
) MUTEX_Abandon( thdb
->mutex_list
);
426 /* FIXME: should free the stack somehow */
428 /* FIXME: We cannot do this; once the current thread is destroyed,
429 synchronization primitives do not work properly. */
430 K32OBJ_DecCount( &thdb
->header
);
432 /* Completely unlock the system lock just in case */
433 count
= SYSTEM_LOCK_COUNT();
434 while (count
--) SYSTEM_UNLOCK();
435 SYSDEPS_ExitThread();
439 /***********************************************************************
440 * GetCurrentThread [KERNEL32.200] Gets pseudohandle for current thread
443 * Pseudohandle for the current thread
445 HANDLE32 WINAPI
GetCurrentThread(void)
447 return CURRENT_THREAD_PSEUDOHANDLE
;
451 /***********************************************************************
452 * GetCurrentThreadId [KERNEL32.201] Returns thread identifier.
455 * Thread identifier of calling thread
457 DWORD WINAPI
GetCurrentThreadId(void)
459 return THDB_TO_THREAD_ID( THREAD_Current() );
463 /**********************************************************************
464 * GetLastError [KERNEL.148] [KERNEL32.227] Returns last-error code.
467 * Calling thread's last error code value.
469 DWORD WINAPI
GetLastError(void)
471 THDB
*thread
= THREAD_Current();
472 DWORD ret
= thread
->last_error
;
473 TRACE(thread
,"0x%lx\n",ret
);
478 /**********************************************************************
479 * SetLastError [KERNEL.147] [KERNEL32.497] Sets the last-error code.
484 void WINAPI
SetLastError(
485 DWORD error
) /* [in] Per-thread error code */
487 THDB
*thread
= THREAD_Current();
488 /* This one must work before we have a thread (FIXME) */
490 TRACE(thread
,"%p error=0x%lx\n",thread
,error
);
493 thread
->last_error
= error
;
497 /**********************************************************************
498 * SetLastErrorEx [USER32.485] Sets the last-error code.
503 void WINAPI
SetLastErrorEx(
504 DWORD error
, /* [in] Per-thread error code */
505 DWORD type
) /* [in] Error type */
507 TRACE(thread
, "(0x%08lx, 0x%08lx)\n", error
,type
);
514 /* Fall through for now */
516 FIXME(thread
, "(error=%08lx, type=%08lx): Unhandled type\n", error
,type
);
519 SetLastError( error
);
523 /**********************************************************************
526 DWORD
THREAD_TlsAlloc(THDB
*thread
)
528 DWORD i
, mask
, ret
= 0;
529 DWORD
*bits
= thread
->process
->tls_bits
;
530 EnterCriticalSection( &thread
->process
->crit_section
);
531 if (*bits
== 0xffffffff)
535 if (*bits
== 0xffffffff)
537 LeaveCriticalSection( &thread
->process
->crit_section
);
538 SetLastError( ERROR_NO_MORE_ITEMS
);
542 for (i
= 0, mask
= 1; i
< 32; i
++, mask
<<= 1) if (!(*bits
& mask
)) break;
544 LeaveCriticalSection( &thread
->process
->crit_section
);
549 /**********************************************************************
550 * TlsAlloc [KERNEL32.530] Allocates a TLS index.
552 * Allocates a thread local storage index
556 * Failure: 0xFFFFFFFF
558 DWORD WINAPI
TlsAlloc(void)
560 return THREAD_TlsAlloc(THREAD_Current());
564 /**********************************************************************
565 * TlsFree [KERNEL32.531] Releases a TLS index.
567 * Releases a thread local storage index, making it available for reuse
573 BOOL32 WINAPI
TlsFree(
574 DWORD index
) /* [in] TLS Index to free */
577 THDB
*thread
= THREAD_Current();
578 DWORD
*bits
= thread
->process
->tls_bits
;
581 SetLastError( ERROR_INVALID_PARAMETER
);
584 EnterCriticalSection( &thread
->process
->crit_section
);
585 if (index
>= 32) bits
++;
586 mask
= (1 << (index
& 31));
587 if (!(*bits
& mask
)) /* already free? */
589 LeaveCriticalSection( &thread
->process
->crit_section
);
590 SetLastError( ERROR_INVALID_PARAMETER
);
594 thread
->tls_array
[index
] = 0;
595 /* FIXME: should zero all other thread values */
596 LeaveCriticalSection( &thread
->process
->crit_section
);
601 /**********************************************************************
602 * TlsGetValue [KERNEL32.532] Gets value in a thread's TLS slot
605 * Success: Value stored in calling thread's TLS slot for index
606 * Failure: 0 and GetLastError returns NO_ERROR
608 LPVOID WINAPI
TlsGetValue(
609 DWORD index
) /* [in] TLS index to retrieve value for */
611 THDB
*thread
= THREAD_Current();
614 SetLastError( ERROR_INVALID_PARAMETER
);
617 SetLastError( ERROR_SUCCESS
);
618 return thread
->tls_array
[index
];
622 /**********************************************************************
623 * TlsSetValue [KERNEL32.533] Stores a value in the thread's TLS slot.
629 BOOL32 WINAPI
TlsSetValue(
630 DWORD index
, /* [in] TLS index to set value for */
631 LPVOID value
) /* [in] Value to be stored */
633 THDB
*thread
= THREAD_Current();
636 SetLastError( ERROR_INVALID_PARAMETER
);
639 thread
->tls_array
[index
] = value
;
644 /***********************************************************************
645 * SetThreadContext [KERNEL32.670] Sets context of thread.
651 BOOL32 WINAPI
SetThreadContext(
652 HANDLE32 handle
, /* [in] Handle to thread with context */
653 CONTEXT
*context
) /* [out] Address of context structure */
655 THDB
*thread
= THREAD_GetPtr( handle
, THREAD_GET_CONTEXT
, NULL
);
656 if (!thread
) return FALSE
;
657 *context
= thread
->context
;
658 K32OBJ_DecCount( &thread
->header
);
662 /***********************************************************************
663 * GetThreadContext [KERNEL32.294] Retrieves context of thread.
669 BOOL32 WINAPI
GetThreadContext(
670 HANDLE32 handle
, /* [in] Handle to thread with context */
671 CONTEXT
*context
) /* [out] Address of context structure */
673 THDB
*thread
= THREAD_GetPtr( handle
, THREAD_GET_CONTEXT
, NULL
);
674 if (!thread
) return FALSE
;
675 *context
= thread
->context
;
676 K32OBJ_DecCount( &thread
->header
);
681 /**********************************************************************
682 * GetThreadPriority [KERNEL32.296] Returns priority for thread.
685 * Success: Thread's priority level.
686 * Failure: THREAD_PRIORITY_ERROR_RETURN
688 INT32 WINAPI
GetThreadPriority(
689 HANDLE32 hthread
) /* [in] Handle to thread */
694 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
695 return THREAD_PRIORITY_ERROR_RETURN
;
696 ret
= thread
->delta_priority
;
697 K32OBJ_DecCount( &thread
->header
);
702 /**********************************************************************
703 * SetThreadPriority [KERNEL32.514] Sets priority for thread.
709 BOOL32 WINAPI
SetThreadPriority(
710 HANDLE32 hthread
, /* [in] Handle to thread */
711 INT32 priority
) /* [in] Thread priority level */
715 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_SET_INFORMATION
, NULL
)))
717 thread
->delta_priority
= priority
;
718 K32OBJ_DecCount( &thread
->header
);
723 /**********************************************************************
724 * TerminateThread [KERNEL32.685] Terminates a thread
730 BOOL32 WINAPI
TerminateThread(
731 HANDLE32 handle
, /* [in] Handle to thread */
732 DWORD exitcode
) /* [in] Exit code for thread */
738 if (!(thread
= THREAD_GetPtr( handle
, THREAD_TERMINATE
, &server_handle
)))
740 ret
= !CLIENT_TerminateThread( server_handle
, exitcode
);
741 K32OBJ_DecCount( &thread
->header
);
746 /**********************************************************************
747 * GetExitCodeThread [KERNEL32.???] Gets termination status of thread.
753 BOOL32 WINAPI
GetExitCodeThread(
754 HANDLE32 hthread
, /* [in] Handle to thread */
755 LPDWORD exitcode
) /* [out] Address to receive termination status */
760 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, &server_handle
)))
762 if (server_handle
!= -1)
764 struct get_thread_info_reply info
;
765 CLIENT_GetThreadInfo( server_handle
, &info
);
766 if (exitcode
) *exitcode
= info
.exit_code
;
768 else if (exitcode
) *exitcode
= thread
->exit_code
;
769 K32OBJ_DecCount( &thread
->header
);
774 /**********************************************************************
775 * ResumeThread [KERNEL32.587] Resumes a thread.
777 * Decrements a thread's suspend count. When count is zero, the
778 * execution of the thread is resumed.
781 * Success: Previous suspend count
782 * Failure: 0xFFFFFFFF
785 DWORD WINAPI
ResumeThread(
786 HANDLE32 hthread
) /* [in] Indentifies thread to restart */
792 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
795 WARN(thread
, "Invalid thread handle\n");
798 if ((oldcount
= thread
->suspend_count
) != 0)
800 if (!--thread
->suspend_count
)
802 if (kill(thread
->unix_pid
, SIGCONT
))
804 WARN(thread
, "Unable to CONTinue pid: %04x\n",
806 oldcount
= 0xFFFFFFFF;
810 K32OBJ_DecCount(&thread
->header
);
816 /**********************************************************************
817 * SuspendThread [KERNEL32.681] Suspends a thread.
820 * Success: Previous suspend count
821 * Failure: 0xFFFFFFFF
823 DWORD WINAPI
SuspendThread(
824 HANDLE32 hthread
) /* [in] Handle to the thread */
830 if (!(thread
= THREAD_GetPtr( hthread
, THREAD_QUERY_INFORMATION
, NULL
)))
833 WARN(thread
, "Invalid thread handle\n");
837 if (!(oldcount
= thread
->suspend_count
))
839 if (thread
->unix_pid
== getpid())
840 WARN(thread
, "Attempting to suspend myself\n" );
843 if (kill(thread
->unix_pid
, SIGSTOP
))
845 WARN(thread
, "Unable to STOP pid: %04x\n",
847 oldcount
= 0xFFFFFFFF;
849 else thread
->suspend_count
++;
852 else thread
->suspend_count
++;
853 K32OBJ_DecCount( &thread
->header
);
860 /**********************************************************************
861 * GetThreadTimes [KERNEL32.???] Obtains timing information.
864 * What are the fields where these values are stored?
870 BOOL32 WINAPI
GetThreadTimes(
871 HANDLE32 thread
, /* [in] Specifies the thread of interest */
872 LPFILETIME creationtime
, /* [out] When the thread was created */
873 LPFILETIME exittime
, /* [out] When the thread was destroyed */
874 LPFILETIME kerneltime
, /* [out] Time thread spent in kernel mode */
875 LPFILETIME usertime
) /* [out] Time thread spent in user mode */
877 FIXME(thread
,"(0x%08x): stub\n",thread
);
878 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
883 /**********************************************************************
884 * AttachThreadInput [KERNEL32.8] Attaches input of 1 thread to other
886 * Attaches the input processing mechanism of one thread to that of
893 BOOL32 WINAPI
AttachThreadInput(
894 DWORD idAttach
, /* [in] Thread to attach */
895 DWORD idAttachTo
, /* [in] Thread to attach to */
896 BOOL32 fAttach
) /* [in] Attach or detach */
900 FIXME(thread
, "(0x%08lx,0x%08lx,%d): stub\n",idAttach
,idAttachTo
,fAttach
);
901 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
913 /**********************************************************************
914 * VWin32_BoostThreadGroup [KERNEL.535]
916 VOID WINAPI
VWin32_BoostThreadGroup( DWORD threadId
, INT32 boost
)
918 FIXME(thread
, "(0x%08lx,%d): stub\n", threadId
, boost
);
921 /**********************************************************************
922 * VWin32_BoostThreadStatic [KERNEL.536]
924 VOID WINAPI
VWin32_BoostThreadStatic( DWORD threadId
, INT32 boost
)
926 FIXME(thread
, "(0x%08lx,%d): stub\n", threadId
, boost
);