diff options
author | Christopher Faylor <me@cgf.cx> | 2003-04-28 20:10:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-04-28 20:10:54 +0000 |
commit | 6ef342e4603b75fa789004db934c0daea53ae132 (patch) | |
tree | 371478341ba7b6b583221f2336ad2c5299082386 | |
parent | eae4b2b0bc87e9de4c56fda110a9d2813cf0ddce (diff) | |
download | newlib-6ef342e4603b75fa789004db934c0daea53ae132.zip newlib-6ef342e4603b75fa789004db934c0daea53ae132.tar.gz newlib-6ef342e4603b75fa789004db934c0daea53ae132.tar.bz2 |
* profil.h (PROFADDR): Prevent overflow when text segments are larger than
256k.
* profil.c (profthr_func): Raise thread priority for more accurate sampling.
* path.cc (hash_path_name): Use ino_t as type.
-rw-r--r-- | winsup/cygwin/ChangeLog | 11 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/profil.c | 2 | ||||
-rw-r--r-- | winsup/cygwin/profil.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/winsup.h | 2 |
5 files changed, 15 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 598f91b..adb1c0c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,14 @@ +2003-04-28 Brian Ford <ford@vss.fsi.com> + + * profil.h (PROFADDR): Prevent overflow when text segments are larger + than 256k. + * profil.c (profthr_func): Raise thread priority for more accurate + sampling. + +2003-04-26 Christopher Faylor <cgf@redhat.com> + + * path.cc (hash_path_name): Use ino_t as type. + 2003-04-26 Christopher Faylor <cgf@redhat.com> * errno.cc (_sys_nerr): Fix compile error erroneously checked in on diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index 78b240e..eacee88 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -90,11 +90,7 @@ typedef __gid16_t gid_t; #ifndef __ino_t_defined #define __ino_t_defined -#ifdef __CYGWIN_USE_BIG_TYPES1__ typedef unsigned long long ino_t; -#else -typedef unsigned long ino_t; -#endif #endif /*__ino_t_defined*/ #ifndef __BIT_TYPES_DEFINED diff --git a/winsup/cygwin/profil.c b/winsup/cygwin/profil.c index 7be0839..cbfffc1 100644 --- a/winsup/cygwin/profil.c +++ b/winsup/cygwin/profil.c @@ -62,6 +62,8 @@ profthr_func (LPVOID arg) struct profinfo *p = (struct profinfo *) arg; u_long pc, idx; + SetThreadPriority(p->profthr, THREAD_PRIORITY_TIME_CRITICAL); + for (;;) { pc = (u_long) get_thrpc (p->targthr); diff --git a/winsup/cygwin/profil.h b/winsup/cygwin/profil.h index 582b2a7..7ec4dfa 100644 --- a/winsup/cygwin/profil.h +++ b/winsup/cygwin/profil.h @@ -24,7 +24,7 @@ details. */ /* convert an index into an address */ #define PROFADDR(idx, base, scale) \ - ((base) + ((((idx) << 16) / (scale)) << 1)) + ((base) + ((((unsigned long long)(idx) << 16) / (scale)) << 1)) /* convert a bin size into a scale */ #define PROFSCALE(range, bins) (((bins) << 16) / ((range) >> 1)) diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 456339e..8060ffa 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -198,7 +198,7 @@ int __stdcall writable_directory (const char *file); int __stdcall stat_dev (DWORD, int, unsigned long, struct __stat64 *); extern BOOL allow_ntsec; -unsigned long __stdcall hash_path_name (unsigned long hash, const char *name) __attribute__ ((regparm(2))); +unsigned long __stdcall hash_path_name (ino_t hash, const char *name) __attribute__ ((regparm(2))); void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2))); extern "C" char *__stdcall rootdir (char *full_path) __attribute__ ((regparm(1))); |