cvs commit: src/sys/kern uipc_syscalls.c

Robert Watson rwatson at FreeBSD.org
Tue Apr 25 11:48:16 UTC 2006


rwatson     2006-04-25 11:48:16 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_syscalls.c 
  Log:
  Extend getsock() to return the struct file flags read while holding the
  file lock, in the style of fgetsock().
  
  Modify accept1() to use getsock() instead of fgetsock(), relying on the
  file descriptor reference rather than an acquired socket reference to
  prevent the listen socket from being destroyed during accept().  This
  avoids additional reference count operations, which should improve
  performance, and also avoids accept1() operating on a socket whose file
  descriptor has been torn down, which may have resulted in protocol
  shutdown starting.
  
  MFC after:      3 months
  
  Revision  Changes    Path
  1.227     +19 -18    src/sys/kern/uipc_syscalls.c


More information about the cvs-src mailing list