From patchwork Mon Feb 3 18:31:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 37655 Received: (qmail 23942 invoked by alias); 3 Feb 2020 18:38:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23907 invoked by uid 89); 3 Feb 2020 18:38:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=5713, 1167, HContent-Transfer-Encoding:8bit X-HELO: esa3.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1580755120; x=1612291120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aFkncfqOejmSQxT3Rs2LJkFDBePoG2PJrEb86n0KPf0=; b=d4mQ5R5exmz/kaDa0VezBvuUgVY2a0TLndKyqFuud6smigoeOOwm8h5z SuxnGnOhwNTGmKm1SqjNvJXbRZQ9Mxjcy4dkxDarWtYnoD9Bqaw3GWae6 QnaHtyXTkloJ644qXV1lYShmiYat7S1A83xTkCNnBUMeSN9zTer3LB4BM UMQKT8KVIuZbh9AwKZuK31pNYEHMqO8gvbFJjBWfLXy8AuqDwnIWOPdQU sZyOaJ/CNqQoTulZ+T1PYZEzlBn+5TYgR8We2CejeKe0bfNexEV7LYtvx ZJ8d1cP+AFzoVhSZ8IjuEEZ6M2hgJ0XIyNpzY15Il3xVBZNf/LrX+qzIX Q==; IronPort-SDR: 4NN0QhJgcO1mDwLPeQ2+698EjXZDXBG3U+dR8kvqaBfm3RhxbQzatXtdxpr/+ioAur+kHhTXJa AT43tsvWn72zFHIsJjFkSMUeugckgsdaOdjudwkk9ta6WsB92wJ1kI1pGAFiwHtki7e4BSKSCb 0eY1ble7/9Z+HL0MIoW0eVJzgN4jTX4tZxM1satnJY4YHfXGG6QPNMOA14sMsJEPhaOwZdX3+r W66FkBLQF3TPDJbOOQKUkoTFcwxu6ALQfMwl0KLsRHmu+72moVQAkaeBUJ4YajgIkURQAjyUKn kok= IronPort-SDR: 3OVef4GIYVbefEtwpX2tvjhDAYc4xkuk5ngtI4qcyi7A6JCbPP4Eh0d/6cntxd8pKi8o+0qXpb f9NPOXVn9rdnyUrOjNFGLcf4UHzloIiJYATe6+9S1mWus78MxRWTjOUb8kH/vUEpjGed7PoSI5 OmbBX7Zu0mGSmcKGg5TjcPxgA+4jxDM9g+vVAFTVy+ZqYB3Dr3zSV0rl/vnj0/fm93EqnaWJCo g3XGXqtMbRp+bZLUyRPhqFz3FOgrqAjPpywiMCrb4c9QP87ljQNgG9WX7wvqG4CenQlEAqI4vC MQs1hfREUwQFz/qxavPF8hfg IronPort-SDR: /rbNK5rdKkT34XhG8Xbv9trz6pR/yMHaZmzj1g6QHT4yV9t2qV2D29LDpCWup9sBAkdVI6DYvZ 1LBUadbzV4YhPZ91ZHlJu0VcTnVoGFfkApHmRL8vRqLgZ28UJI70Gh0UQDwD73cIKtdRC919GJ YREpuGtgSgOLkaSF9PtyDe+RCo7ZTD31oFpCpYO+EONHw+YHRxVn/Nk6Vc6Ln4KZ15L4zAIniV REZ0tgpUBcoSM6O7vl7Gj/ajn8LmyiKihbmHXVWqHQ1VBPrv/Ixv5fIxFLq/2fuHAFcitwcKLz OGU= WDCIronportException: Internal From: Alistair Francis To: libc-alpha@sourceware.org Cc: alistair23@gmail.com, lukma@denx.de, Alistair Francis Subject: [PATCH 1/6] sysv/linux: Rename alpha functions to be alpha specific Date: Mon, 3 Feb 2020 10:31:48 -0800 Message-Id: <20200203183153.11635-2-alistair.francis@wdc.com> In-Reply-To: <20200203183153.11635-1-alistair.francis@wdc.com> References: <20200203183153.11635-1-alistair.francis@wdc.com> MIME-Version: 1.0 These functions are alpha specifc, rename them to be clear. Reviewed-by: Lukasz Majewski --- sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 8 ++++---- sysdeps/unix/sysv/linux/alpha/osf_getitimer.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_getrusage.c | 2 +- sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c | 2 +- sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 8 ++++---- sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c | 2 +- sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_wait4.c | 2 +- sysdeps/unix/sysv/linux/alpha/tv32-compat.h | 14 +++++++------- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c index 9825a4734d..bd8fe5f92d 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c @@ -57,13 +57,13 @@ int attribute_compat_text_section __adjtime_tv32 (const struct timeval32 *itv, struct timeval32 *otv) { - struct timeval itv64 = valid_timeval32_to_timeval (*itv); + struct timeval itv64 = alpha_valid_timeval32_to_timeval (*itv); struct timeval otv64; if (__adjtime (&itv64, &otv64) == -1) return -1; - *otv = valid_timeval_to_timeval32 (otv64); + *otv = alpha_valid_timeval_to_timeval32 (otv64); return 0; } @@ -91,7 +91,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx64.calcnt = tx->calcnt; tx64.errcnt = tx->errcnt; tx64.stbcnt = tx->stbcnt; - tx64.time = valid_timeval32_to_timeval (tx->time); + tx64.time = alpha_valid_timeval32_to_timeval (tx->time); int status = __adjtimex (&tx64); if (status < 0) @@ -116,7 +116,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx->calcnt = tx64.calcnt; tx->errcnt = tx64.errcnt; tx->stbcnt = tx64.stbcnt; - tx->time = valid_timeval_to_timeval32 (tx64.time); + tx->time = alpha_valid_timeval_to_timeval32 (tx64.time); return status; } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c b/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c index e9de2b287b..3c1bfdca38 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_getitimer.c @@ -33,9 +33,9 @@ __getitimer_tv32 (int which, struct itimerval32 *curr_value) /* Write all fields of 'curr_value' regardless of overflow. */ curr_value->it_interval - = valid_timeval_to_timeval32 (curr_value_64.it_interval); + = alpha_valid_timeval_to_timeval32 (curr_value_64.it_interval); curr_value->it_value - = valid_timeval_to_timeval32 (curr_value_64.it_value); + = alpha_valid_timeval_to_timeval32 (curr_value_64.it_value); return 0; } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c b/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c index 74c6fb49aa..571bf3559a 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_getrusage.c @@ -31,7 +31,7 @@ __getrusage_tv32 (int who, struct rusage32 *usage32) if (__getrusage (who, &usage64) == -1) return -1; - rusage64_to_rusage32 (usage32, &usage64); + alpha_rusage64_to_rusage32 (usage32, &usage64); return 0; } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c b/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c index df7f06765b..9c800e1a0d 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_gettimeofday.c @@ -38,7 +38,7 @@ __gettimeofday_tv32 (struct timeval32 *restrict tv32, void *restrict tz) struct timespec ts; __clock_gettime (CLOCK_REALTIME, &ts); - *tv32 = valid_timespec_to_timeval32 (ts); + *tv32 = alpha_valid_timespec_to_timeval32 (ts); return 0; } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c index 7df2d1b71c..0e70a6ebda 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c @@ -30,9 +30,9 @@ __setitimer_tv32 (int which, const struct itimerval32 *restrict new_value, { struct itimerval new_value_64; new_value_64.it_interval - = valid_timeval32_to_timeval (new_value->it_interval); + = alpha_valid_timeval32_to_timeval (new_value->it_interval); new_value_64.it_value - = valid_timeval32_to_timeval (new_value->it_value); + = alpha_valid_timeval32_to_timeval (new_value->it_value); if (old_value == NULL) return __setitimer (which, &new_value_64, NULL); @@ -43,9 +43,9 @@ __setitimer_tv32 (int which, const struct itimerval32 *restrict new_value, /* Write all fields of 'old_value' regardless of overflow. */ old_value->it_interval - = valid_timeval_to_timeval32 (old_value_64.it_interval); + = alpha_valid_timeval_to_timeval32 (old_value_64.it_interval); old_value->it_value - = valid_timeval_to_timeval32 (old_value_64.it_value); + = alpha_valid_timeval_to_timeval32 (old_value_64.it_value); return 0; } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c b/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c index 6e17a95a47..092a6e6f7b 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_settimeofday.c @@ -42,7 +42,7 @@ __settimeofday_tv32 (const struct timeval32 *tv32, return __settimezone (tz); } - struct timespec ts = valid_timeval32_to_timespec (*tv32); + struct timespec ts = alpha_valid_timeval32_to_timespec (*tv32); return __clock_settime (CLOCK_REALTIME, &ts); } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c index 6c3fad0132..006427c7fa 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c @@ -28,8 +28,8 @@ attribute_compat_text_section __utimes_tv32 (const char *filename, const struct timeval32 times32[2]) { struct timeval times[2]; - times[0] = valid_timeval32_to_timeval (times32[0]); - times[1] = valid_timeval32_to_timeval (times32[1]); + times[0] = alpha_valid_timeval32_to_timeval (times32[0]); + times[1] = alpha_valid_timeval32_to_timeval (times32[1]); return __utimes (filename, times); } diff --git a/sysdeps/unix/sysv/linux/alpha/osf_wait4.c b/sysdeps/unix/sysv/linux/alpha/osf_wait4.c index 6af8347871..c773be0d3a 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_wait4.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_wait4.c @@ -33,7 +33,7 @@ __wait4_tv32 (pid_t pid, int *status, int options, struct rusage32 *usage32) pid_t child = __wait4 (pid, status, options, &usage64); if (child >= 0 && usage32 != NULL) - rusage64_to_rusage32 (usage32, &usage64); + alpha_rusage64_to_rusage32 (usage32, &usage64); return child; } diff --git a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h index 8e34ed1c1b..dbc020ddf8 100644 --- a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h +++ b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h @@ -70,13 +70,13 @@ struct rusage32 overflow, they write { INT32_MAX, TV_USEC_MAX } to the output. */ 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 }; } 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) } 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 }; } 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 }; } 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); - r32->ru_utime = valid_timeval_to_timeval32 (r64->ru_utime); - r32->ru_stime = valid_timeval_to_timeval32 (r64->ru_stime); + r32->ru_utime = alpha_valid_timeval_to_timeval32 (r64->ru_utime); + r32->ru_stime = alpha_valid_timeval_to_timeval32 (r64->ru_stime); r32->ru_maxrss = r64->ru_maxrss; r32->ru_ixrss = r64->ru_ixrss; r32->ru_idrss = r64->ru_idrss;