"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/ntdll/thread.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

thread.c  (wine-5.12.tar.xz):thread.c  (wine-5.13.tar.xz)
skipping to change at line 167 skipping to change at line 167
__EXCEPT(call_unhandled_exception_filter) __EXCEPT(call_unhandled_exception_filter)
{ {
NtTerminateThread( GetCurrentThread(), GetExceptionCode() ); NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
} }
__ENDTRY __ENDTRY
} }
#endif /* __i386__ */ #endif /* __i386__ */
/*********************************************************************** /***********************************************************************
* NtCreateThreadEx (NTDLL.@)
*/
NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT
_ATTRIBUTES *attr,
HANDLE process, PRTL_THREAD_START_ROUTINE star
t, void *param,
ULONG flags, SIZE_T zero_bits, SIZE_T stack_co
mmit,
SIZE_T stack_reserve, PS_ATTRIBUTE_LIST *attr_
list )
{
return unix_funcs->NtCreateThreadEx( handle_ptr, access, attr, process, star
t, param,
flags, zero_bits, stack_commit, stack_r
eserve, attr_list );
}
/***********************************************************************
* RtlCreateUserThread (NTDLL.@) * RtlCreateUserThread (NTDLL.@)
*/ */
NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr, NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, SECURITY_DESCRIPTOR *descr,
BOOLEAN suspended, PVOID stack_addr, BOOLEAN suspended, PVOID stack_addr,
SIZE_T stack_reserve, SIZE_T stack_commit, SIZE_T stack_reserve, SIZE_T stack_commit,
PRTL_THREAD_START_ROUTINE start, void *para m, PRTL_THREAD_START_ROUTINE start, void *para m,
HANDLE *handle_ptr, CLIENT_ID *id ) HANDLE *handle_ptr, CLIENT_ID *id )
{ {
ULONG flags = suspended ? THREAD_CREATE_FLAGS_CREATE_SUSPENDED : 0; ULONG flags = suspended ? THREAD_CREATE_FLAGS_CREATE_SUSPENDED : 0;
HANDLE handle; ULONG_PTR buffer[offsetof( PS_ATTRIBUTE_LIST, Attributes[2] ) / sizeof(ULONG
_PTR)];
PS_ATTRIBUTE_LIST *attr_list = (PS_ATTRIBUTE_LIST *)buffer;
HANDLE handle, actctx;
TEB *teb;
ULONG ret;
NTSTATUS status; NTSTATUS status;
CLIENT_ID client_id; CLIENT_ID client_id;
OBJECT_ATTRIBUTES attr; OBJECT_ATTRIBUTES attr;
PS_ATTRIBUTE_LIST attr_list = { sizeof(attr_list) };
attr_list.Attributes[0].Attribute = PS_ATTRIBUTE_CLIENT_ID; attr_list->TotalLength = sizeof(buffer);
attr_list.Attributes[0].Size = sizeof(client_id); attr_list->Attributes[0].Attribute = PS_ATTRIBUTE_CLIENT_ID;
attr_list.Attributes[0].ValuePtr = &client_id; attr_list->Attributes[0].Size = sizeof(client_id);
attr_list->Attributes[0].ValuePtr = &client_id;
attr_list->Attributes[0].ReturnLength = NULL;
attr_list->Attributes[1].Attribute = PS_ATTRIBUTE_TEB_ADDRESS;
attr_list->Attributes[1].Size = sizeof(teb);
attr_list->Attributes[1].ValuePtr = &teb;
attr_list->Attributes[1].ReturnLength = NULL;
InitializeObjectAttributes( &attr, NULL, 0, NULL, descr ); InitializeObjectAttributes( &attr, NULL, 0, NULL, descr );
RtlGetActiveActivationContext( &actctx );
if (actctx) flags |= THREAD_CREATE_FLAGS_CREATE_SUSPENDED;
status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process, start , param, status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process, start , param,
flags, 0, stack_commit, stack_reserve, &attr_list ); flags, 0, stack_commit, stack_reserve, attr_list );
if (!status) if (!status)
{ {
if (actctx)
{
ULONG_PTR cookie;
RtlActivateActivationContextEx( 0, teb, actctx, &cookie );
if (!suspended) NtResumeThread( handle, &ret );
}
if (id) *id = client_id; if (id) *id = client_id;
if (handle_ptr) *handle_ptr = handle; if (handle_ptr) *handle_ptr = handle;
else NtClose( handle ); else NtClose( handle );
} }
if (actctx) RtlReleaseActivationContext( actctx );
return status; return status;
} }
/****************************************************************************** /******************************************************************************
* RtlGetNtGlobalFlags (NTDLL.@) * RtlGetNtGlobalFlags (NTDLL.@)
*/ */
ULONG WINAPI RtlGetNtGlobalFlags(void) ULONG WINAPI RtlGetNtGlobalFlags(void)
{ {
return NtCurrentTeb()->Peb->NtGlobalFlag; return NtCurrentTeb()->Peb->NtGlobalFlag;
} }
/***********************************************************************
* NtOpenThread (NTDLL.@)
* ZwOpenThread (NTDLL.@)
*/
NTSTATUS WINAPI NtOpenThread( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id
)
{
return unix_funcs->NtOpenThread( handle, access, attr, id );
}
/******************************************************************************
* NtSuspendThread (NTDLL.@)
* ZwSuspendThread (NTDLL.@)
*/
NTSTATUS WINAPI NtSuspendThread( HANDLE handle, PULONG count )
{
return unix_funcs->NtSuspendThread( handle, count );
}
/******************************************************************************
* NtResumeThread (NTDLL.@)
* ZwResumeThread (NTDLL.@)
*/
NTSTATUS WINAPI NtResumeThread( HANDLE handle, PULONG count )
{
return unix_funcs->NtResumeThread( handle, count );
}
/******************************************************************************
* NtAlertResumeThread (NTDLL.@)
* ZwAlertResumeThread (NTDLL.@)
*/
NTSTATUS WINAPI NtAlertResumeThread( HANDLE handle, PULONG count )
{
return unix_funcs->NtAlertResumeThread( handle, count );
}
/******************************************************************************
* NtAlertThread (NTDLL.@)
* ZwAlertThread (NTDLL.@)
*/
NTSTATUS WINAPI NtAlertThread( HANDLE handle )
{
return unix_funcs->NtAlertThread( handle );
}
/******************************************************************************
* NtTerminateThread (NTDLL.@)
* ZwTerminateThread (NTDLL.@)
*/
NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
{
return unix_funcs->NtTerminateThread( handle, exit_code );
}
/******************************************************************************
* NtQueueApcThread (NTDLL.@)
*/
NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1
,
ULONG_PTR arg2, ULONG_PTR arg3 )
{
return unix_funcs->NtQueueApcThread( handle, func, arg1, arg2, arg3 );
}
/****************************************************************************** /******************************************************************************
* RtlPushFrame (NTDLL.@) * RtlPushFrame (NTDLL.@)
*/ */
void WINAPI RtlPushFrame( TEB_ACTIVE_FRAME *frame ) void WINAPI RtlPushFrame( TEB_ACTIVE_FRAME *frame )
{ {
frame->Previous = NtCurrentTeb()->ActiveFrame; frame->Previous = NtCurrentTeb()->ActiveFrame;
NtCurrentTeb()->ActiveFrame = frame; NtCurrentTeb()->ActiveFrame = frame;
} }
/****************************************************************************** /******************************************************************************
skipping to change at line 309 skipping to change at line 252
/****************************************************************************** /******************************************************************************
* RtlGetFrame (NTDLL.@) * RtlGetFrame (NTDLL.@)
*/ */
TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void) TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void)
{ {
return NtCurrentTeb()->ActiveFrame; return NtCurrentTeb()->ActiveFrame;
} }
/*********************************************************************** /***********************************************************************
* NtContinue (NTDLL.@)
*/
NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
{
return unix_funcs->NtContinue( context, alertable );
}
/***********************************************************************
* NtSetContextThread (NTDLL.@)
* ZwSetContextThread (NTDLL.@)
*/
NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
{
return unix_funcs->NtSetContextThread( handle, context );
}
/***********************************************************************
* NtGetContextThread (NTDLL.@) * NtGetContextThread (NTDLL.@)
* ZwGetContextThread (NTDLL.@) * ZwGetContextThread (NTDLL.@)
*/ */
#ifndef __i386__ #ifndef __i386__
NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
{ {
return unix_funcs->NtGetContextThread( handle, context ); return unix_funcs->NtGetContextThread( handle, context );
} }
#endif #endif
/******************************************************************************
* NtSetLdtEntries (NTDLL.@)
* ZwSetLdtEntries (NTDLL.@)
*/
NTSTATUS WINAPI NtSetLdtEntries( ULONG sel1, LDT_ENTRY entry1, ULONG sel2, LDT_E
NTRY entry2 )
{
return unix_funcs->NtSetLdtEntries( sel1, entry1, sel2, entry2 );
}
/******************************************************************************
* NtQueryInformationThread (NTDLL.@)
* ZwQueryInformationThread (NTDLL.@)
*/
NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
void *data, ULONG length, ULONG *ret_l
en )
{
return unix_funcs->NtQueryInformationThread( handle, class, data, length, re
t_len );
}
/******************************************************************************
* NtSetInformationThread (NTDLL.@)
* ZwSetInformationThread (NTDLL.@)
*/
NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
LPCVOID data, ULONG length )
{
return unix_funcs->NtSetInformationThread( handle, class, data, length );
}
/******************************************************************************
* NtGetCurrentProcessorNumber (NTDLL.@)
*
* Return the processor, on which the thread is running
*
*/
ULONG WINAPI NtGetCurrentProcessorNumber(void)
{
return unix_funcs->NtGetCurrentProcessorNumber();
}
 End of changes. 11 change blocks. 
107 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)