Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-05-11 00:56:07 +0400
committerCorinna Vinschen <corinna@vinschen.de>2005-05-11 00:56:07 +0400
commit13505ca8fce1c22a7f124314a07b4ecbb62bee22 (patch)
treeb106d7bea11ff8519a23d3955c7d4faa20c75f3c /winsup/cygwin/fhandler.h
parenta586e5b6ae64fc46496249b2fd35bec613e3a724 (diff)
* Makefile.in (DLL_OFILES): Add fhandler_mailslot.o.
* devices.h (FH_KMSG): Define new device. * devices.in: Add "/dev/kmsg" entry. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Handle case FH_KMSG. * fhandler.h (class fhandler_mailslot): New class. (class select_stuff): Add device_specific_mailslot pointer. * fhandler_mailslot.cc: New file. * select.cc (peek_mailslot): New function. (verify_mailslot): Ditto. (struct mailslotinf): New stuct to handle select on mailslots. (thread_mailslot): New function. (start_thread_mailslot): Ditto. (mailslot_cleanup): Ditto. (fhandler_mailslot::select_read): New method. * syslog.cc (klog_guard): New muto. (dev_kmsg): Local mailslot for kernel message device. (vklog): New function. (klog): Ditto. * winsup.h (vklog): Declare. (klog): Ditto. * include/sys/syslog.h: Define _PATH_KLOG.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index b8cdfd0fe..375866d54 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -360,6 +360,17 @@ class fhandler_base
friend class fhandler_fifo;
};
+class fhandler_mailslot : public fhandler_base
+{
+ public:
+ fhandler_mailslot ();
+ int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
+ int open (int flags, mode_t mode = 0);
+ int write (const void *ptr, size_t len);
+ int ioctl (unsigned int cmd, void *);
+ select_record *select_read (select_record *s);
+};
+
class fhandler_socket: public fhandler_base
{
private:
@@ -1274,6 +1285,7 @@ typedef union
char __dev_tape[sizeof (fhandler_dev_tape)];
char __dev_zero[sizeof (fhandler_dev_zero)];
char __disk_file[sizeof (fhandler_disk_file)];
+ char __mailslot[sizeof (fhandler_mailslot)];
char __pipe[sizeof (fhandler_pipe)];
char __proc[sizeof (fhandler_proc)];
char __process[sizeof (fhandler_process)];
@@ -1327,6 +1339,7 @@ class select_stuff
void *device_specific_pipe;
void *device_specific_socket;
void *device_specific_serial;
+ void *device_specific_mailslot;
int test_and_set (int i, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds);
@@ -1336,7 +1349,8 @@ class select_stuff
select_stuff (): always_ready (0), windows_used (0), start (0),
device_specific_pipe (0),
device_specific_socket (0),
- device_specific_serial (0) {}
+ device_specific_serial (0),
+ device_specific_mailslot (0) {}
};
int __stdcall set_console_state_for_spawn ();