From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33941 invoked by alias); 5 Mar 2020 09:51:17 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 33932 invoked by uid 89); 5 Mar 2020 09:51:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=2115 X-HELO: mail-out.m-online.net Date: Thu, 05 Mar 2020 09:51:00 -0000 From: Lukasz Majewski To: Alistair Francis Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org, Joseph Myers , Zack Weinberg Subject: Re: [PATCH v5 1/8] sysv/linux: Rename alpha functions to be alpha specific Message-ID: <20200305105110.602dc17d@jawa> In-Reply-To: <20200303175355.15770-2-alistair.francis@wdc.com> References: <20200303175355.15770-1-alistair.francis@wdc.com> <20200303175355.15770-2-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/80oEW/qh=k4Dq9LCbWkqAwz"; protocol="application/pgp-signature" X-SW-Source: 2020-03/txt/msg00099.txt --Sig_/80oEW/qh=k4Dq9LCbWkqAwz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-length: 12213 Dear All, > These functions are alpha specifc, rename them to be clear. >=20 > Let's also rename the header file from tv32-compat.h to > alpha-tv32-compat.h. This is to avoid conflicts with the one we will > introduce later. >=20 Are there any more comments for this patch set from Alistair? Is it eligible for pulling? > Reviewed-by: Lukasz Majewski > --- > .../alpha/{tv32-compat.h =3D> alpha-tv32-compat.h} | 16 > ++++++++-------- sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | > 10 +++++----- sysdeps/unix/sysv/linux/alpha/osf_getitimer.c | 6 > +++--- sysdeps/unix/sysv/linux/alpha/osf_getrusage.c | 4 ++-- > sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c | 4 ++-- > sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 10 +++++----- > sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c | 4 ++-- > sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 6 +++--- > sysdeps/unix/sysv/linux/alpha/osf_wait4.c | 4 ++-- > 9 files changed, 32 insertions(+), 32 deletions(-) > rename sysdeps/unix/sysv/linux/alpha/{tv32-compat.h =3D> > alpha-tv32-compat.h} (88%) >=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h > b/sysdeps/unix/sysv/linux/alpha/alpha-tv32-compat.h similarity index > 88% rename from sysdeps/unix/sysv/linux/alpha/tv32-compat.h > rename to sysdeps/unix/sysv/linux/alpha/alpha-tv32-compat.h > index 8e34ed1c1b..3073005c65 100644 > --- a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h > +++ b/sysdeps/unix/sysv/linux/alpha/alpha-tv32-compat.h > @@ -70,13 +70,13 @@ struct rusage32 > overflow, they write { INT32_MAX, TV_USEC_MAX } to the output. */ >=20=20 > static inline struct timeval > -valid_timeval32_to_timeval (const struct timeval32 tv) > +alpha_valid_timeval32_to_timeval (const struct timeval32 tv) > { > return (struct timeval) { tv.tv_sec, tv.tv_usec }; > } >=20=20 > static inline struct timeval32 > -valid_timeval_to_timeval32 (const struct timeval tv64) > +alpha_valid_timeval_to_timeval32 (const struct timeval tv64) > { > if (__glibc_unlikely (tv64.tv_sec > (time_t) INT32_MAX)) > return (struct timeval32) { INT32_MAX, TV_USEC_MAX}; > @@ -84,27 +84,27 @@ valid_timeval_to_timeval32 (const struct timeval > tv64) } >=20=20 > static inline struct timespec > -valid_timeval32_to_timespec (const struct timeval32 tv) > +alpha_valid_timeval32_to_timespec (const struct timeval32 tv) > { > return (struct timespec) { tv.tv_sec, tv.tv_usec * 1000 }; > } >=20=20 > static inline struct timeval32 > -valid_timespec_to_timeval32 (const struct timespec ts) > +alpha_valid_timespec_to_timeval32 (const struct timespec ts) > { > return (struct timeval32) { (time_t) ts.tv_sec, ts.tv_nsec / 1000 > }; } >=20=20 > static inline void > -rusage64_to_rusage32 (struct rusage32 *restrict r32, > +alpha_rusage64_to_rusage32 (struct rusage32 *restrict r32, > const struct rusage *restrict r64) > { > /* Make sure the entire output structure is cleared, including > padding and reserved fields. */ > memset (r32, 0, sizeof *r32); >=20=20 > - r32->ru_utime =3D valid_timeval_to_timeval32 (r64->ru_utime); > - r32->ru_stime =3D valid_timeval_to_timeval32 (r64->ru_stime); > + r32->ru_utime =3D alpha_valid_timeval_to_timeval32 > (r64->ru_utime); > + r32->ru_stime =3D alpha_valid_timeval_to_timeval32 > (r64->ru_stime); r32->ru_maxrss =3D r64->ru_maxrss; > r32->ru_ixrss =3D r64->ru_ixrss; > r32->ru_idrss =3D r64->ru_idrss; > @@ -121,4 +121,4 @@ rusage64_to_rusage32 (struct rusage32 *restrict > r32, r32->ru_nivcsw =3D r64->ru_nivcsw; > } >=20=20 > -#endif /* tv32-compat.h */ > +#endif /* alpha-tv32-compat.h */ > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c > b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c index > 9825a4734d..f0a1123639 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c @@ -22,7 +22,7 @@ >=20=20 > #include > #include > -#include > +#include >=20=20 > struct timex32 { > unsigned int modes; /* mode selector */ > @@ -57,13 +57,13 @@ int > attribute_compat_text_section > __adjtime_tv32 (const struct timeval32 *itv, struct timeval32 *otv) > { > - struct timeval itv64 =3D valid_timeval32_to_timeval (*itv); > + struct timeval itv64 =3D alpha_valid_timeval32_to_timeval (*itv); > struct timeval otv64; >=20=20 > if (__adjtime (&itv64, &otv64) =3D=3D -1) > return -1; >=20=20 > - *otv =3D valid_timeval_to_timeval32 (otv64); > + *otv =3D alpha_valid_timeval_to_timeval32 (otv64); > return 0; > } >=20=20 > @@ -91,7 +91,7 @@ __adjtimex_tv32 (struct timex32 *tx) > tx64.calcnt =3D tx->calcnt; > tx64.errcnt =3D tx->errcnt; > tx64.stbcnt =3D tx->stbcnt; > - tx64.time =3D valid_timeval32_to_timeval (tx->time); > + tx64.time =3D alpha_valid_timeval32_to_timeval (tx->time); >=20=20 > int status =3D __adjtimex (&tx64); > if (status < 0) > @@ -116,7 +116,7 @@ __adjtimex_tv32 (struct timex32 *tx) > tx->calcnt =3D tx64.calcnt; > tx->errcnt =3D tx64.errcnt; > tx->stbcnt =3D tx64.stbcnt; > - tx->time =3D valid_timeval_to_timeval32 (tx64.time); > + tx->time =3D alpha_valid_timeval_to_timeval32 (tx64.time); >=20=20 > return status; > } > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c > b/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c index > e9de2b287b..204d4ba796 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c @@ -21,7 +21,7 @@ > #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) >=20=20 > #include > -#include > +#include >=20=20 > int > attribute_compat_text_section > @@ -33,9 +33,9 @@ __getitimer_tv32 (int which, struct itimerval32 > *curr_value)=20 > /* Write all fields of 'curr_value' regardless of overflow. */ > curr_value->it_interval > - =3D valid_timeval_to_timeval32 (curr_value_64.it_interval); > + =3D alpha_valid_timeval_to_timeval32 (curr_value_64.it_interval); > curr_value->it_value > - =3D valid_timeval_to_timeval32 (curr_value_64.it_value); > + =3D alpha_valid_timeval_to_timeval32 (curr_value_64.it_value); > return 0; > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c > b/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c index > 74c6fb49aa..be81994654 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c @@ -22,7 +22,7 @@ >=20=20 > #include > #include > -#include > +#include >=20=20 > int > __getrusage_tv32 (int who, struct rusage32 *usage32) > @@ -31,7 +31,7 @@ __getrusage_tv32 (int who, struct rusage32 *usage32) > if (__getrusage (who, &usage64) =3D=3D -1) > return -1; >=20=20 > - rusage64_to_rusage32 (usage32, &usage64); > + alpha_rusage64_to_rusage32 (usage32, &usage64); > return 0; > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c > b/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c index > df7f06765b..9ffda2fde3 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c @@ -23,7 +23,7 @@ > #include > #include > #include > -#include > +#include >=20=20 > /* Get the current time of day and timezone information putting it > into *TV and *TZ. */ > @@ -38,7 +38,7 @@ __gettimeofday_tv32 (struct timeval32 *restrict > tv32, void *restrict tz) struct timespec ts; > __clock_gettime (CLOCK_REALTIME, &ts); >=20=20 > - *tv32 =3D valid_timespec_to_timeval32 (ts); > + *tv32 =3D alpha_valid_timespec_to_timeval32 (ts); > return 0; > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c > b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c index > 7df2d1b71c..726dfc8b0e 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c @@ -21,7 +21,7 @@ > #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) >=20=20 > #include > -#include > +#include >=20=20 > int > attribute_compat_text_section > @@ -30,9 +30,9 @@ __setitimer_tv32 (int which, const struct > itimerval32 *restrict new_value, { > struct itimerval new_value_64; > new_value_64.it_interval > - =3D valid_timeval32_to_timeval (new_value->it_interval); > + =3D alpha_valid_timeval32_to_timeval (new_value->it_interval); > new_value_64.it_value > - =3D valid_timeval32_to_timeval (new_value->it_value); > + =3D alpha_valid_timeval32_to_timeval (new_value->it_value); >=20=20 > if (old_value =3D=3D NULL) > return __setitimer (which, &new_value_64, NULL); > @@ -43,9 +43,9 @@ __setitimer_tv32 (int which, const struct > itimerval32 *restrict new_value,=20 > /* Write all fields of 'old_value' regardless of overflow. */ > old_value->it_interval > - =3D valid_timeval_to_timeval32 (old_value_64.it_interval); > + =3D alpha_valid_timeval_to_timeval32 (old_value_64.it_interval); > old_value->it_value > - =3D valid_timeval_to_timeval32 (old_value_64.it_value); > + =3D alpha_valid_timeval_to_timeval32 (old_value_64.it_value); > return 0; > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c > b/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c index > 6e17a95a47..044363e079 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c @@ -23,7 +23,7 @@ > #include > #include > #include > -#include > +#include >=20=20 > /* Set the current time of day and timezone information. > This call is restricted to the super-user. */ > @@ -42,7 +42,7 @@ __settimeofday_tv32 (const struct timeval32 *tv32, > return __settimezone (tz); > } >=20=20 > - struct timespec ts =3D valid_timeval32_to_timespec (*tv32); > + struct timespec ts =3D alpha_valid_timeval32_to_timespec (*tv32); > return __clock_settime (CLOCK_REALTIME, &ts); > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c > b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c index > 6c3fad0132..8ad9fb567c 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c @@ -21,15 +21,15 @@ > #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) >=20=20 > #include > -#include > +#include >=20=20 > int > attribute_compat_text_section > __utimes_tv32 (const char *filename, const struct timeval32 > times32[2]) { > struct timeval times[2]; > - times[0] =3D valid_timeval32_to_timeval (times32[0]); > - times[1] =3D valid_timeval32_to_timeval (times32[1]); > + times[0] =3D alpha_valid_timeval32_to_timeval (times32[0]); > + times[1] =3D alpha_valid_timeval32_to_timeval (times32[1]); > return __utimes (filename, times); > } >=20=20 > diff --git a/sysdeps/unix/sysv/linux/alpha/osf_wait4.c > b/sysdeps/unix/sysv/linux/alpha/osf_wait4.c index > 6af8347871..c664e8e93f 100644 --- > a/sysdeps/unix/sysv/linux/alpha/osf_wait4.c +++ > b/sysdeps/unix/sysv/linux/alpha/osf_wait4.c @@ -23,7 +23,7 @@ > #include > #include > #include > -#include > +#include >=20=20 > pid_t > attribute_compat_text_section > @@ -33,7 +33,7 @@ __wait4_tv32 (pid_t pid, int *status, int options, > struct rusage32 *usage32) pid_t child =3D __wait4 (pid, status, > options, &usage64);=20 > if (child >=3D 0 && usage32 !=3D NULL) > - rusage64_to_rusage32 (usage32, &usage64); > + alpha_rusage64_to_rusage32 (usage32, &usage64); > return child; > } >=20=20 Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/80oEW/qh=k4Dq9LCbWkqAwz Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature Content-length: 488 -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAl5gy44ACgkQAR8vZIA0 zr0MiggAgalD8748v4Ri2sWSsWsUAacrzpHvJ66ls2RYtB+JToXb5nwu3duoI4M6 AmmSSxRLF93vU+RGdtC5hdmttErVD78ufH6MCFSf+LQWASuPV3FfB+hqobTX8DwS 3qDDGN9axPcaREF7D+AjB7FA5oH+MBJci725tWAFCtzqVoJlezHRwq36u8/dRTyw vN1jD2x72kpt/MZ7cqewhatK5sbyDPZKVB46ySnHtO350TA+ISd2jgEFp2D10Zmm mbISHxcOFC6/9fh03+7eM/mbfW9K9ESoy6hKgihgz8dELdiDelVwKID2A8tc6Jki 42vkf2vRaTRTYAGK6vj5RcQ7kHmUdQ== =kDn7 -----END PGP SIGNATURE----- --Sig_/80oEW/qh=k4Dq9LCbWkqAwz--