* fhandler.h (class fhandler_mailslot): Move down in file and change

parent class to fhandler_base_overlapped.  Remove declaration of
	method write.  Add declaraiotns for raw_read and raw_write.
	* fhandler_mailslot.cc (fhandler_mailslot::fhandler_mailslot): Call
	fhandler_base_overlapped constructor.
	(fhandler_mailslot::fstat): Call fhandler_base_overlapped::fstat.
	(fhandler_mailslot::open): Drop FILE_SYNCHRONOUS_IO_NONALERT flag from
	call to NtOpenFile.
	(fhandler_mailslot::raw_read): New method.
	(fhandler_mailslot::raw_write): Ditto.  Take over length algorithm from
	former write method.
	(fhandler_mailslot::write): Remove.
	(fhandler_mailslot::ioctl): Call fhandler_base_overlapped::ioctl.
This commit is contained in:
Corinna Vinschen
2011-05-04 12:56:12 +00:00
parent 412693ab65
commit 82fa6b929b
3 changed files with 42 additions and 20 deletions

View File

@ -405,18 +405,6 @@ public:
virtual bool __stdcall has_ongoing_io () __attribute__ ((regparm (1))) {return false;}
};
class fhandler_mailslot : public fhandler_base
{
POBJECT_ATTRIBUTES get_object_attr (OBJECT_ATTRIBUTES &, PUNICODE_STRING, int);
public:
fhandler_mailslot ();
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
int ioctl (unsigned int cmd, void *);
select_record *select_read (select_stuff *);
};
struct wsa_event
{
LONG serial_number;
@ -667,6 +655,19 @@ public:
select_record *select_except (select_stuff *);
};
class fhandler_mailslot : public fhandler_base_overlapped
{
POBJECT_ATTRIBUTES get_object_attr (OBJECT_ATTRIBUTES &, PUNICODE_STRING, int);
public:
fhandler_mailslot ();
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int open (int flags, mode_t mode = 0);
void __stdcall raw_read (void *ptr, size_t& len);
ssize_t __stdcall raw_write (const void *, size_t);
int ioctl (unsigned int cmd, void *);
select_record *select_read (select_stuff *);
};
class fhandler_dev_raw: public fhandler_base
{
protected: