git: kernel - Fix atomic op comparison

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jul 24 00:57:19 PDT 2016


commit 743146ae2a6000d439d5977d490403d7fdf54979
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jul 24 00:56:04 2016 -0700

    kernel - Fix atomic op comparison
    
    * The sequence was testing a signed integer and then testing the same
      variable using atomic_fetchadd_int(&var, 0).  Unfortunately, the
      atomic-op returns an unsigned value so the result is that when the
      buffer count was exhausted, the program would hard-loop without
      calling tsleep.
    
    * Fixed by casting the atomic op.
    
    * Should fix the hardlock issue once and for all.

Summary of changes:
 sys/vm/vm_pager.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/743146ae2a6000d439d5977d490403d7fdf54979


-- 
DragonFly BSD source repository


More information about the Commits mailing list