* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
This commit is contained in:
parent
becac6c5b1
commit
b576fca12a
23
io/ftw.c
23
io/ftw.c
@ -587,6 +587,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
|
||||
int result = 0;
|
||||
int save_err;
|
||||
int cwdfd = -1;
|
||||
char *cwd = NULL;
|
||||
char *cp;
|
||||
|
||||
/* First make sure the parameters are reasonable. */
|
||||
@ -645,10 +646,17 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
|
||||
descriptor. */
|
||||
cwdfd = __open (".", O_RDONLY | O_DIRECTORY);
|
||||
if (cwdfd == -1)
|
||||
result = -1;
|
||||
else
|
||||
{
|
||||
if (data.maxdir > 1)
|
||||
/* Try getting the directory name. This can be needed if
|
||||
the current directory is executable but not readable. */
|
||||
if (errno == EACCES)
|
||||
/* GNU extension ahead. */
|
||||
cwd = __getcwd (NULL, 0);
|
||||
|
||||
if (cwd == NULL)
|
||||
goto out_fail;
|
||||
}
|
||||
else if (data.maxdir > 1)
|
||||
/* Account for the file descriptor we use here. */
|
||||
--data.maxdir;
|
||||
|
||||
@ -669,7 +677,6 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Get stat info for start directory. */
|
||||
if (result == 0)
|
||||
@ -729,8 +736,16 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
|
||||
__fchdir (cwdfd);
|
||||
__set_errno (save_err);
|
||||
}
|
||||
else if (cwd != NULL)
|
||||
{
|
||||
int save_err = errno;
|
||||
__chdir (cwd);
|
||||
free (cwd);
|
||||
__set_errno (save_err);
|
||||
}
|
||||
|
||||
/* Free all memory. */
|
||||
out_fail:
|
||||
save_err = errno;
|
||||
__tdestroy (data.known_objects, free);
|
||||
free (data.dirbuf);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
|
||||
lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
|
||||
|
||||
2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||
|
||||
* sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
|
||||
|
@ -75,7 +75,8 @@
|
||||
: "=a" (__status) \
|
||||
: "0" (SYS_futex), LLL_EBX_REG (futex), "S" (0), \
|
||||
"c" (FUTEX_WAIT), "d" (_val), \
|
||||
"i" (offsetof (tcbhead_t, sysinfo))); \
|
||||
"i" (offsetof (tcbhead_t, sysinfo)) \
|
||||
: "memory"); \
|
||||
__status; \
|
||||
})
|
||||
|
||||
@ -90,7 +91,8 @@
|
||||
: "=a" (__status) \
|
||||
: "0" (SYS_futex), LLL_EBX_REG (futex), "S" (timeout), \
|
||||
"c" (FUTEX_WAIT), "d" (_val), \
|
||||
"i" (offsetof (tcbhead_t, sysinfo))); \
|
||||
"i" (offsetof (tcbhead_t, sysinfo)) \
|
||||
: "memory"); \
|
||||
__status; \
|
||||
})
|
||||
|
||||
@ -346,7 +348,8 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
|
||||
: "=&a" (__ignore) \
|
||||
: "i" (SYS_futex), LLL_EBX_REG (&tid), "S" (0), \
|
||||
"c" (FUTEX_WAIT), "d" (_tid), \
|
||||
"i" (offsetof (tcbhead_t, sysinfo))); \
|
||||
"i" (offsetof (tcbhead_t, sysinfo)) \
|
||||
: "memory"); \
|
||||
} while (0)
|
||||
|
||||
extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
|
||||
|
Loading…
Reference in New Issue
Block a user