Update sw_sync.c from jb_chocolate