Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 May 2009 15:36:02 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/amd64/linux32 linux32_sysvec.c src/sys/compat/linux linux_futex.c src/sys/i386/linux linux_sysvec.c
Message-ID:  <200905011538.n41FcDgc069556@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
dchagin     2009-05-01 15:36:02 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/linux32    linux32_sysvec.c 
    sys/compat/linux     linux_futex.c 
    sys/i386/linux       linux_sysvec.c 
  Log:
  SVN rev 191719 on 2009-05-01 15:36:02Z by dchagin
  
  Reimplement futexes.
  Old implemention used Giant to protect the kernel data structures,
  but at the same time called malloc(M_WAITOK), that could cause the
  calling thread to sleep and lost Giant protection. User-visible
  result was the missed wakeup.
  
  New implementation uses one sx lock per futex. The sx protects
  the futex structures and allows to sleep while copyin or copyout
  are performed.
  
  Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
  is requested and either caller specified futexes are equial or
  second futex already exists. This is acceptable since the situation
  can only occur from the application error, and glibc falls back to
  old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.
  
  Approved by:    kib (mentor)
  MFC after:      1 month
  
  Revision  Changes    Path
  1.47      +3 -3      src/sys/amd64/linux32/linux32_sysvec.c
  1.20      +450 -359  src/sys/compat/linux/linux_futex.c
  1.163     +3 -3      src/sys/i386/linux/linux_sysvec.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905011538.n41FcDgc069556>