git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Peart <peartben@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>, benpeart@microsoft.com
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] test-drop-caches: mark file local symbols with static
Date: Mon, 18 Sep 2017 08:32:43 -0400	[thread overview]
Message-ID: <756cf0ba-aad8-3fdb-298a-f174394e5895@gmail.com> (raw)
In-Reply-To: <762d317b-8174-1809-a077-38b036850d3f@ramsayjones.plus.com>



On 9/17/2017 12:14 PM, Ramsay Jones wrote:
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Ben,
> 
> If you need to re-roll your 'bp/fsmonitor' branch, could you please
> squash this into the relevant patch (commit c6b5a28941, "fsmonitor:
> add a performance test", 15-09-2017).

Absolutely.  Thanks!

I'd really appreciate some feedback on whether this works properly on 
platform other than Windows.

> 
> Thanks!
> 
> ATB,
> Ramsay Jones
> 
>   t/helper/test-drop-caches.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/t/helper/test-drop-caches.c b/t/helper/test-drop-caches.c
> index 717079865..17590170f 100644
> --- a/t/helper/test-drop-caches.c
> +++ b/t/helper/test-drop-caches.c
> @@ -2,7 +2,7 @@
>   
>   #if defined(GIT_WINDOWS_NATIVE)
>   
> -int cmd_sync(void)
> +static int cmd_sync(void)
>   {
>   	char Buffer[MAX_PATH];
>   	DWORD dwRet;
> @@ -49,7 +49,7 @@ typedef enum _SYSTEM_MEMORY_LIST_COMMAND {
>   	MemoryCommandMax
>   } SYSTEM_MEMORY_LIST_COMMAND;
>   
> -BOOL GetPrivilege(HANDLE TokenHandle, LPCSTR lpName, int flags)
> +static BOOL GetPrivilege(HANDLE TokenHandle, LPCSTR lpName, int flags)
>   {
>   	BOOL bResult;
>   	DWORD dwBufferLength;
> @@ -77,7 +77,7 @@ BOOL GetPrivilege(HANDLE TokenHandle, LPCSTR lpName, int flags)
>   	return bResult;
>   }
>   
> -int cmd_dropcaches(void)
> +static int cmd_dropcaches(void)
>   {
>   	HANDLE hProcess = GetCurrentProcess();
>   	HANDLE hToken;
> @@ -118,36 +118,36 @@ int cmd_dropcaches(void)
>   
>   #elif defined(__linux__)
>   
> -int cmd_sync(void)
> +static int cmd_sync(void)
>   {
>   	return system("sync");
>   }
>   
> -int cmd_dropcaches(void)
> +static int cmd_dropcaches(void)
>   {
>   	return system("echo 3 | sudo tee /proc/sys/vm/drop_caches");
>   }
>   
>   #elif defined(__APPLE__)
>   
> -int cmd_sync(void)
> +static int cmd_sync(void)
>   {
>   	return system("sync");
>   }
>   
> -int cmd_dropcaches(void)
> +static int cmd_dropcaches(void)
>   {
>   	return system("sudo purge");
>   }
>   
>   #else
>   
> -int cmd_sync(void)
> +static int cmd_sync(void)
>   {
>   	return 0;
>   }
>   
> -int cmd_dropcaches(void)
> +static int cmd_dropcaches(void)
>   {
>   	return error("drop caches not implemented on this platform");
>   }
> 

      reply	other threads:[~2017-09-18 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 16:14 [PATCH] test-drop-caches: mark file local symbols with static Ramsay Jones
2017-09-18 12:32 ` Ben Peart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=756cf0ba-aad8-3fdb-298a-f174394e5895@gmail.com \
    --to=peartben@gmail.com \
    --cc=benpeart@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).