Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 06:58:35 +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:  <200905310659.n4V6xBaW016835@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
dchagin     2009-05-31 06:58:35 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/amd64/linux32    linux32_sysvec.c 
    sys/compat/linux     linux_futex.c 
    sys/i386/linux       linux_sysvec.c 
  Log:
  SVN rev 193152 on 2009-05-31 06:58:35Z by dchagin
  
  MFC r191719:
  
  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)
  
  Revision   Changes    Path
  1.31.2.11  +3 -3      src/sys/amd64/linux32/linux32_sysvec.c
  1.10.2.6   +450 -359  src/sys/compat/linux/linux_futex.c
  1.150.2.9  +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?200905310659.n4V6xBaW016835>