testsuite_hooks.cc: Use __throw_exception_again instead of just throw.
* testsuite/testsuite_hooks.cc: Use __throw_exception_again instead of just throw. From-SVN: r92881
This commit is contained in:
parent
8ca82e0965
commit
35a91d7611
@ -1,5 +1,8 @@
|
|||||||
2005-01-03 Mark Mitchell <mark@codesourcery.com>
|
2005-01-03 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* testsuite/testsuite_hooks.cc: Use __throw_exception_again
|
||||||
|
instead of just throw.
|
||||||
|
|
||||||
* testsuite/testsuite_hooks.cc: Update coypright and follow style
|
* testsuite/testsuite_hooks.cc: Update coypright and follow style
|
||||||
guidelines.
|
guidelines.
|
||||||
* testsuite/testsuite_hooks.h: Likewise.
|
* testsuite/testsuite_hooks.h: Likewise.
|
||||||
|
@ -296,13 +296,15 @@ namespace __gnu_test
|
|||||||
// Get a semaphore set with one semaphore.
|
// Get a semaphore set with one semaphore.
|
||||||
sem_set_ = semget(IPC_PRIVATE, 1, SEM_R | SEM_A);
|
sem_set_ = semget(IPC_PRIVATE, 1, SEM_R | SEM_A);
|
||||||
if (sem_set_ == -1)
|
if (sem_set_ == -1)
|
||||||
throw std::runtime_error ("could not obtain semaphore set");
|
__throw_exception_again
|
||||||
|
std::runtime_error ("could not obtain semaphore set");
|
||||||
|
|
||||||
// Initialize the semaphore.
|
// Initialize the semaphore.
|
||||||
union semun val;
|
union semun val;
|
||||||
val.val = 0;
|
val.val = 0;
|
||||||
if (semctl(sem_set_, 0, SETVAL, val) == -1)
|
if (semctl(sem_set_, 0, SETVAL, val) == -1)
|
||||||
throw std::runtime_error("could not initialize semaphore");
|
__throw_exception_again
|
||||||
|
std::runtime_error("could not initialize semaphore");
|
||||||
#else
|
#else
|
||||||
// There are no semaphores on this system. We have no way to mark
|
// There are no semaphores on this system. We have no way to mark
|
||||||
// a test as "unsupported" at runtime, so we just exit, pretending
|
// a test as "unsupported" at runtime, so we just exit, pretending
|
||||||
@ -327,7 +329,8 @@ namespace __gnu_test
|
|||||||
{ 0, 1, 0 }
|
{ 0, 1, 0 }
|
||||||
};
|
};
|
||||||
if (semop(sem_set_, op, 1) == -1)
|
if (semop(sem_set_, op, 1) == -1)
|
||||||
throw std::runtime_error("could not signal semaphore");
|
__throw_exception_again
|
||||||
|
std::runtime_error("could not signal semaphore");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +341,8 @@ namespace __gnu_test
|
|||||||
{ 0, -1, SEM_UNDO }
|
{ 0, -1, SEM_UNDO }
|
||||||
};
|
};
|
||||||
if (semop(sem_set_, op, 1) == -1)
|
if (semop(sem_set_, op, 1) == -1)
|
||||||
throw std::runtime_error("could not wait for semaphore");
|
__throw_exception_again
|
||||||
|
std::runtime_error("could not wait for semaphore");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}; // namespace __gnu_test
|
}; // namespace __gnu_test
|
||||||
|
Loading…
Reference in New Issue
Block a user