[PATCH] server, ntoskrnl: Implement support for IRP_MJ_CREATE requests.

Charles Davis cdavis at mymail.mines.edu
Tue Nov 10 06:52:59 CST 2009


Vitaliy Margolen wrote:
> Charles Davis wrote:
>> Also, add stub handlers in mountmgr.
>>
>> This patch fixes an issue with the previous one where wine would hang if
>> ntoskrnl got a STATUS_BUFFER_OVERFLOW back from thes server.
>> ---
> 
>> +int suspend_thread( struct thread *thread );
>> +int resume_thread( struct thread *thread );
> 
>> +static void complete_open( struct open_call *open, unsigned int status )
>> +{
> ...
>> +    resume_thread( open->call.thread );
> 
> 
>> This  static struct object *device_open_file( struct object *obj, unsigned int access,
>>                                          unsigned int sharing, unsigned int options )
>>  {
> ...
>> +    suspend_thread( current );
> 
> Looks like a hack to me. You shouldn't be suspending/resuming threads
> directly like this. They should block on open operation.
> 
> Vitaliy.
> 
> 
I figured that. At the time, though, I thought that this was the path of
least resistance, but I wasn't sure.

I guess now I should make open_file_object return STATUS_PENDING, then
make FILE_CreateFile() wait until some object is signaled. (This is the
way we do IOCTLs.) I'll send a patch shortly for this.

Chip




More information about the wine-devel mailing list