Changeset e1cb28a3a913418ac845c622e0d1647ed0d24d39
- Timestamp:
- 20/09/08 20:07:42
(2 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1221934062 +0200
- git-parent:
[340c83d8de4cc03c0c37d92ae3172a123781064a]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1221933826 +0200
- Message:
mtime: Make nanosleep a bit more cancelable than what it is on osx.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rd06c5b3 |
re1cb28a |
|
| 367 | 367 | #undef msleep |
|---|
| 368 | 368 | |
|---|
| | 369 | #if defined(__APPLE__) && defined( HAVE_NANOSLEEP ) |
|---|
| | 370 | /* Mac OS X 10.5's nanosleep is not a cancellation point */ |
|---|
| | 371 | static inline int |
|---|
| | 372 | semi_testcancelable_nanosleep(const struct timespec *rqtp, struct timespec *rmtp) |
|---|
| | 373 | { |
|---|
| | 374 | int ret; |
|---|
| | 375 | pthread_testcancel(); |
|---|
| | 376 | ret = nanosleep(rqtp, rmtp); |
|---|
| | 377 | pthread_testcancel(); |
|---|
| | 378 | return ret; |
|---|
| | 379 | } |
|---|
| | 380 | #define nanosleep semi_testcancelable_nanosleep |
|---|
| | 381 | #endif |
|---|
| | 382 | |
|---|
| 369 | 383 | /** |
|---|
| 370 | 384 | * Portable usleep(). Cancellation point. |
|---|