Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le vendredi 23 mars 2012 à 01:26 -0700, Christopher Li a écrit :
> On Thu, Mar 15, 2012 at 7:15 AM, Frederic Crozat <fcrozat@xxxxxxxx> wrote:
> > while working on integrating sparse checks in systemd, I noticed some
> > builtin functions need to be added to sparse list. See attached patch
> > for the fix.
> 
> Catching up my backlogs. I just find out this patch does not have sign off.
> 
> Can you add a sign off line please?

Sorry, I didn't knew you needed this.

I've update the patch with adding yet another sync barrier which is now used in systemd.

-- 
Frederic Crozat <fcrozat@xxxxxxxx>
SUSE

>From 60fe1c5011209ff8ea35ba76d3993d0b345f237b Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@xxxxxxxx>
Date: Fri, 23 Mar 2012 10:31:01 +0100
Subject: [PATCH] Add __builtin_stpcpy, __sync_synchronize,
 __sync_bool_compare_and_swap to declare_builtin_functions

---
 lib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib.c b/lib.c
index 396e9f1..b61a79f 100644
--- a/lib.c
+++ b/lib.c
@@ -682,6 +682,7 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strspn(const char *, const char *);\n");
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strcspn(const char *, const char *);\n");
 	add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n");
+	add_pre_buffer("extern char* __builtin_stpcpy(const char *, const char*);\n");
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n");
 
 	/* And bitwise operations.. */
@@ -714,6 +715,8 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n");
 	add_pre_buffer("extern long __builtin_labs(long);\n");
 	add_pre_buffer("extern double __builtin_fabs(double);\n");
+	add_pre_buffer("extern void __sync_synchronize();\n");
+	add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, void, void);\n");
 
 	/* Add Blackfin-specific stuff */
 	add_pre_buffer(
-- 
1.7.7


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux