semaphore_wait() until KERN_SUCCESS

Like the Posix code below it, the Mac semaphore wait code
can wake spuriously.  Keep trying if we get KERN_ABORTED.

Pattern aped from V8.  I noticed they like us don't do
anything to test if the Windows WaitForSingleObject()
call fails.  Can it fail?

Bug: chromium:977341
Change-Id: I34f407fc4d6717deb6edcf7aa7bed1f8fb8b1baa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222583
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232376
Reviewed-by: Mike Klein <mtklein@google.com>
1 file changed