mirror of git://gcc.gnu.org/git/gcc.git
re PR go/48019 (Need to handle EINTR in libgo testsuite)
PR go/48019 Ignore EINTR in runtime_lock_full. From-SVN: r170810
This commit is contained in:
parent
8897c836a8
commit
7b5e671326
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "go-assert.h"
|
#include "go-assert.h"
|
||||||
|
|
||||||
|
|
@ -32,8 +33,12 @@ static void runtime_lock_full(Lock *l) __attribute__ ((noinline));
|
||||||
static void
|
static void
|
||||||
runtime_lock_full(Lock *l)
|
runtime_lock_full(Lock *l)
|
||||||
{
|
{
|
||||||
if(sem_wait(&l->sem) != 0)
|
for(;;){
|
||||||
runtime_throw("sem_wait failed");
|
if(sem_wait(&l->sem) == 0)
|
||||||
|
return;
|
||||||
|
if(errno != EINTR)
|
||||||
|
runtime_throw("sem_wait failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue