1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
2002-07-15  Ulrich Drepper  <drepper@redhat.com>

	* libio/wfileops.c (_IO_wfile_seekoff): Reposition wide pointers
	and adjust state for seek position.  [PR libc/4070]
	* libio/Makefile (tests): Add bug-rewind.
	* libio/bug-rewind.c: New file.
This commit is contained in:
Ulrich Drepper
2002-07-15 23:37:22 +00:00
parent c3da4f0cba
commit 706d1dee46
9 changed files with 163 additions and 11 deletions

View File

@ -31,6 +31,37 @@ handle_descr (const td_thragent_t *ta, td_thr_iter_f *callback,
size_t sizeof_descr = ta->sizeof_descr;
td_thrhandle_t th;
if (descr == NULL)
{
/* No descriptor (yet). */
if (cnt == 0)
{
/* This is the main thread. Create a fake descriptor. */
memset (&pds, '\0', sizeof (pds));
/* Empty thread descriptor the thread library would create. */
pds.p_header.data.self = &pds;
pds.p_nextlive = pds.p_prevlive = &pds;
pds.p_tid = PTHREAD_THREADS_MAX;
/* The init code also sets up p_lock, p_errnop, p_herrnop, and
p_userstack but this should not be necessary here. */
th.th_ta_p = (td_thragent_t *) ta;
th.th_unique = &pds;
if (callback (&th, cbdata_p) != 0)
return TD_DBERR;
/* All done successfully. */
return TD_OK;
}
else if (cnt == 1)
/* The manager is not yet started. No big deal. */
return TD_OK;
else
/* For every other thread this should not happen. */
return TD_ERR;
}
if (ps_pdread (ta->ph, descr, &pds, sizeof_descr) != PS_OK)
return TD_ERR; /* XXX Other error value? */