1. 11 5月, 2007 1 次提交
    • D
      signal/timer/event: signalfd core · fba2afaa
      Davide Libenzi 提交于
      This patch series implements the new signalfd() system call.
      
      I took part of the original Linus code (and you know how badly it can be
      broken :), and I added even more breakage ;) Signals are fetched from the same
      signal queue used by the process, so signalfd will compete with standard
      kernel delivery in dequeue_signal().  If you want to reliably fetch signals on
      the signalfd file, you need to block them with sigprocmask(SIG_BLOCK).  This
      seems to be working fine on my Dual Opteron machine.  I made a quick test
      program for it:
      
      http://www.xmailserver.org/signafd-test.c
      
      The signalfd() system call implements signal delivery into a file descriptor
      receiver.  The signalfd file descriptor if created with the following API:
      
      int signalfd(int ufd, const sigset_t *mask, size_t masksize);
      
      The "ufd" parameter allows to change an existing signalfd sigmask, w/out going
      to close/create cycle (Linus idea).  Use "ufd" == -1 if you want a brand new
      signalfd file.
      
      The "mask" allows to specify the signal mask of signals that we are interested
      in.  The "masksize" parameter is the size of "mask".
      
      The signalfd fd supports the poll(2) and read(2) system calls.  The poll(2)
      will return POLLIN when signals are available to be dequeued.  As a direct
      consequence of supporting the Linux poll subsystem, the signalfd fd can use
      used together with epoll(2) too.
      
      The read(2) system call will return a "struct signalfd_siginfo" structure in
      the userspace supplied buffer.  The return value is the number of bytes copied
      in the supplied buffer, or -1 in case of error.  The read(2) call can also
      return 0, in case the sighand structure to which the signalfd was attached,
      has been orphaned.  The O_NONBLOCK flag is also supported, and read(2) will
      return -EAGAIN in case no signal is available.
      
      If the size of the buffer passed to read(2) is lower than sizeof(struct
      signalfd_siginfo), -EINVAL is returned.  A read from the signalfd can also
      return -ERESTARTSYS in case a signal hits the process.  The format of the
      struct signalfd_siginfo is, and the valid fields depends of the (->code &
      __SI_MASK) value, in the same way a struct siginfo would:
      
      struct signalfd_siginfo {
      	__u32 signo;	/* si_signo */
      	__s32 err;	/* si_errno */
      	__s32 code;	/* si_code */
      	__u32 pid;	/* si_pid */
      	__u32 uid;	/* si_uid */
      	__s32 fd;	/* si_fd */
      	__u32 tid;	/* si_fd */
      	__u32 band;	/* si_band */
      	__u32 overrun;	/* si_overrun */
      	__u32 trapno;	/* si_trapno */
      	__s32 status;	/* si_status */
      	__s32 svint;	/* si_int */
      	__u64 svptr;	/* si_ptr */
      	__u64 utime;	/* si_utime */
      	__u64 stime;	/* si_stime */
      	__u64 addr;	/* si_addr */
      };
      
      [akpm@linux-foundation.org: fix signalfd_copyinfo() on i386]
      Signed-off-by: NDavide Libenzi <davidel@xmailserver.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fba2afaa
  2. 10 5月, 2007 1 次提交
  3. 08 12月, 2006 1 次提交
  4. 03 7月, 2006 1 次提交
    • T
      [PATCH] irq-flags: consolidate flags for request_irq · 6e213616
      Thomas Gleixner 提交于
      The recent interrupt rework introduced bit value conflicts with sparc.
      Instead of introducing new architecture flags mess, move the interrupt SA_
      flags out of the signal namespace and replace them by interrupt related flags.
      
      This allows to remove the obsolete SA_INTERRUPT flag and clean up the bit
      field values.
      
      This patch:
      
      Move the interrupt related SA_ flags out of linux/signal.h and rename them to
      IRQF_ .  This moves the interrupt related flags out of the signal namespace
      and allows to remove the architecture dependencies.
      
      SA_INTERRUPT is not needed by userspace and glibc so it can be removed safely.
      
      The existing SA_ constants are kept for easy transition and will be
      removed after a 6 month grace period.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Greg KH <greg@kroah.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Jody McIntyre <scjody@modernduck.com>
      Cc: Ben Collins <bcollins@debian.org>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>                                 Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e213616
  5. 28 4月, 2006 1 次提交
  6. 25 4月, 2006 1 次提交
  7. 29 3月, 2006 1 次提交
  8. 09 1月, 2006 2 次提交
    • G
      [PATCH] sigaction should clear all signals on SIG_IGN, not just < 32 · 71fabd5e
      George Anzinger 提交于
      While rooting aroung in the signal code trying to understand how to fix the
      SIG_IGN ploy (set sig handler to SIG_IGN and flood system with high speed
      repeating timers) I came across what, I think, is a problem in sigaction()
      in that when processing a SIG_IGN request it flushes signals from 1 to
      SIGRTMIN and leaves the rest.  Attempt to fix this.
      Signed-off-by: NGeorge Anzinger <george@mvista.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Linus Torvalds <torvalds@osdl.org>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      71fabd5e
    • R
      [PATCH] IRQ type flags · 9ded96f2
      Russell King 提交于
      Some ARM platforms have the ability to program the interrupt controller to
      detect various interrupt edges and/or levels.  For some platforms, this is
      critical to setup correctly, particularly those which the setting is dependent
      on the device.
      
      Currently, ARM drivers do (eg) the following:
      
      	err = request_irq(irq, ...);
      
      	set_irq_type(irq, IRQT_RISING);
      
      However, if the interrupt has previously been programmed to be level sensitive
      (for whatever reason) then this will cause an interrupt storm.
      
      Hence, if we combine set_irq_type() with request_irq(), we can then safely set
      the type prior to unmasking the interrupt.  The unfortunate problem is that in
      order to support this, these flags need to be visible outside of the ARM
      architecture - drivers such as smc91x need these flags and they're
      cross-architecture.
      
      Finally, the SA_TRIGGER_* flag passed to request_irq() should reflect the
      property that the device would like.  The IRQ controller code should do its
      best to select the most appropriate supported mode.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9ded96f2
  9. 31 10月, 2005 1 次提交
  10. 13 6月, 2005 1 次提交
  11. 01 5月, 2005 2 次提交
  12. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4