From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously Date: Fri, 1 Dec 2017 09:29:04 -0800 Message-ID: <20171201092904.30d9831f@xeon-e3> References: <20171201131321.918-1-vkuznets@redhat.com> <20171201131321.918-3-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Stephen Hemminger , kvm@vger.kernel.org, Radim =?UTF-8?B?S3LEjW3DocWZ?= , Haiyang Zhang , x86@kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Ingo Molnar , Andy Lutomirski , "H. Peter Anvin" , devel@linuxdriverproject.org, Thomas Gleixner To: Vitaly Kuznetsov Return-path: In-Reply-To: <20171201131321.918-3-vkuznets@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: kvm.vger.kernel.org On Fri, 1 Dec 2017 14:13:17 +0100 Vitaly Kuznetsov wrote: > + > +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg, > + u64 *cur_tsc) > +{ > + *cur_tsc = rdtsc(); > + > + return cur_tsc; Why do return and setting by reference. Looks like an ugly API.