Displaying 20 results from an estimated 44 matches for "__c".
Did you mean:
__
2003 Nov 24
1
[PATCH] fix off-by-one correction in ctypes
...There was an off-by-one correction that wasn't necessary.
# --------------------------------------------
#
diff -Nru a/klibc/include/ctype.h b/klibc/include/ctype.h
--- a/klibc/include/ctype.h Mon Nov 24 15:37:03 2003
+++ b/klibc/include/ctype.h Mon Nov 24 15:37:03 2003
@@ -35,13 +35,13 @@
__ctype_inline int isalnum(int __c)
{
- return __ctypes[__c+1] &
+ return __ctypes[__c] &
(__ctype_upper|__ctype_lower|__ctype_digit);
}
__ctype_inline int isalpha(int __c)
{
- return __ctypes[__c+1] &
+ return __ctypes[__c] &
(__ctype_upper|__ctype_lower);
}
@@ -...
2003 Nov 11
4
isspace() and other ctype.h functions
..., I'm using klibc in udev and have added some needed functions
(like ftruncate and vsyslog). Should I post the patches here before
commiting them to the cvs tree?
Also, it looks like ctype.h has a off-by-one bug. isspace(' ') returns
0 right now, but if you change the function from:
__ctype_inline int isspace(int __c)
{
return __ctypes[__c+1] & __ctype_space; */
}
to
__ctype_inline int isspace(int __c)
{
return __ctypes[__c] & __ctype_space; */
}
things start working again :)
In looking at the __ctypes[] array, it is 0 based, so all of the +1
array changes in...
2012 Mar 11
0
[PATCH 2/3] fix missing prototypes for ctype inline functions
...e/ctype.h | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/usr/include/ctype.h b/usr/include/ctype.h
index 4fd162b..14a2f2d 100644
--- a/usr/include/ctype.h
+++ b/usr/include/ctype.h
@@ -47,6 +47,20 @@ __extern int tolower(int);
extern const unsigned char __ctypes[];
+__must_inline int __ctype_isalnum(int);
+__must_inline int __ctype_isalpha(int);
+__must_inline int __ctype_isascii(int);
+__must_inline int __ctype_isblank(int);
+__must_inline int __ctype_iscntrl(int);
+__must_inline int __ctype_isdigit(int);
+__must_inline int __ctype_isgraph(int);
+_...
2019 Nov 08
0
[PATCH 01/13] compiler.h: Split {READ, WRITE}_ONCE definitions out into rwonce.h
...+ case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
+ case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
+ default:
+ barrier();
+ __builtin_memcpy((void *)p, (const void *)res, size);
+ barrier();
+ }
+}
+
+#define __READ_ONCE(x, check) \
+({ \
+ union { typeof(x) __val; char __c[1]; } __u; \
+ if (check) \
+ __read_once_size(&(x), __u.__c, sizeof(x)); \
+ else \
+ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
+ smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
+ __u.__val; \
+})
+#define READ_ONCE(x) __READ_ONCE(...
2020 Jun 30
0
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
...r" #sfx "\t" #regs, \
+ ARM64_HAS_LDAPR)
+#else
+#define __LOAD_RCPC(sfx, regs...) "ldar" #sfx "\t" #regs
+#endif /* CONFIG_AS_HAS_LDAPR */
+
+#define __READ_ONCE(x) \
+({ \
+ int atomic = 1; \
+ union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \
+ typeof(&(x)) __x = &(x); \
+ switch (sizeof(x)) { \
+ case 1: \
+ asm volatile(__LOAD_RCPC(b, %w0, %1) \
+ : "=r" (*(__u8 *)__u.__c) \
+ : "Q" (*__x) : "memory"); \
+ break; \
+ case 2: \
+ asm volatile(_...
2020 Jul 10
0
[PATCH v3 19/19] arm64: lto: Strengthen READ_ONCE() to acquire when CONFIG_LTO=y
...M64_HAS_LDAPR)
+#else
+#define __LOAD_RCPC(sfx, regs...) "ldar" #sfx "\t" #regs
+#endif /* CONFIG_AS_HAS_LDAPR */
+
+#define __READ_ONCE(x) \
+({ \
+ typeof(&(x)) __x = &(x); \
+ int atomic = 1; \
+ union { __unqual_scalar_typeof(*__x) __val; char __c[1]; } __u; \
+ switch (sizeof(x)) { \
+ case 1: \
+ asm volatile(__LOAD_RCPC(b, %w0, %1) \
+ : "=r" (*(__u8 *)__u.__c) \
+ : "Q" (*__x) : "memory"); \
+ break; \
+ case 2: \
+ asm volatile(__LOAD_RCPC(h, %w0, %1) \
+ : "=r...
2018 Jan 25
0
[PATCH net-next 11/12] tools/virtio: copy READ/WRITE_ONCE
...gned int *)p = *(unsigned int *)res; break;
+ case 8: *(volatile unsigned long long *)p = *(unsigned long long *)res; break;
+ default:
+ barrier();
+ __builtin_memcpy((void *)p, (const void *)res, size);
+ barrier();
+ }
+}
+
+#define READ_ONCE(x) \
+({ \
+ union { typeof(x) __val; char __c[1]; } __u; \
+ __read_once_size(&(x), __u.__c, sizeof(x)); \
+ smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
+ __u.__val; \
+})
+
+#define WRITE_ONCE(x, val) \
+({ \
+ union { typeof(x) __val; char __c[1]; } __u = \
+ { .__val = (typeof(x)) (val) }; \
+...
2012 May 15
5
[PATCH 0/5] resubmitting pending patches
Hi,
I?ve gone through the mailing list archives and hereby want
to resubmit my pending patches. Most are independent of each
other, except the m68k patch which will only be complete if
sigsuspend is also fixed. (It can be applied before that,
though.)
http://www.zytor.com/pipermail/klibc/2012-January/003173.html
[PATCH] fix m68k support
Resubmitted here as 0005. While there was a question from
2018 Jul 31
2
[PATCH 1/2] drm/nouveau: Print debug message on ACPI probe event
Signed-off-by: Lyude Paul <lyude at redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index ec7861457b84..b2a93e3fa67b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -387,6 +387,7 @@
2016 Aug 03
2
trunk check-all failing on Linux using compiler-rt and libcxx
...rception_linux_test.cc:26:18:
error: redefinition of 'isdigit'
INTERCEPTOR(int, isdigit, int d) {
^
/usr/include/ctype.h:185:1: note: previous definition is here
__isctype_f (digit)
^
/usr/include/ctype.h:93:3: note: expanded from macro '__isctype_f'
is##type (int __c) __THROW
\
^
<scratch space>:835:1: note: expanded from here
isdigit
Without the tests, clang builds and appears to work. And in the checkin
prior to the interception tests, the tests all passed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://...
2011 May 31
1
[LLVMdev] Expressiveness of column numbers in dwarf using clang 3.0?
On 31.05.2011 19:45, Devang Patel wrote:
>
> On May 31, 2011, at 10:36 AM, trash-stuff at gmx.de
> <mailto:trash-stuff at gmx.de> wrote:
>
>> On 31.05.2011 19:22, Devang Patel wrote:
>>>
>>> On May 30, 2011, at 11:11 AM,trash-stuff at gmx.de
>>> <mailto:trash-stuff at gmx.de>wrote:
>>>
>>>> Hi all,
>>>>
2019 Nov 08
15
[PATCH 00/13] Finish off [smp_]read_barrier_depends()
Hi all,
Although [smp_]read_barrier_depends() became part of READ_ONCE() in
commit 76ebbe78f739 ("locking/barriers: Add implicit
smp_read_barrier_depends() to READ_ONCE()"), it still limps on in the
Linux memory model with the sinister hope of attracting innocent new
users so that it becomes impossible to remove altogether.
Let's strike before it's too late: there's only
2017 Dec 05
0
[PATCH tip/core/rcu 21/21] drivers/vhost: Remove now-redundant read_barrier_depends()
...(__u64 *)res; break;
default:
barrier();
__builtin_memcpy((void *)p, (const void *)res, size);
barrier();
}
}
#define WRITE_ONCE(x, val) \
({ \
union { typeof(x) __val; char __c[1]; } __u = \
{ .__val = (__force typeof(x)) (val) }; \
__write_once_size(&(x), __u.__c, sizeof(x)); \
__u.__val; \
})
I don't see WRITE_ONCE inserting any barriers, release or
write.
So it seems that on an architec...
2007 Jan 11
1
[LLVMdev] Ada support for llvm-gcc4
Hello, Duncan.
> 3-fortran.diff
> Get fortran to compile: use the common stubs and rip out
> the incomplete collection of dummy routines someone already put in.
> With this patch, the fortran build dies at this point:
>
> cc1: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:367: void llvm::ScheduleDAG::AddOperand(llvm:
> :MachineInstr*, llvm::SDOperand, unsigned int, const
2017 Dec 05
2
[PATCH tip/core/rcu 21/21] drivers/vhost: Remove now-redundant read_barrier_depends()
On Tue, Dec 05, 2017 at 08:31:20PM +0200, Michael S. Tsirkin wrote:
> Apropos, READ_ONCE is now asymmetrical with WRITE_ONCE.
>
> I can read a pointer with READ_ONCE and be sure the value
> is sane, but only if I also remember to put in smp_wmb before
> WRITE_ONCE. Otherwise the pointer is ok but no guarantees
> about the data pointed to.
That was already the case on
2017 Dec 05
2
[PATCH tip/core/rcu 21/21] drivers/vhost: Remove now-redundant read_barrier_depends()
On Tue, Dec 05, 2017 at 08:31:20PM +0200, Michael S. Tsirkin wrote:
> Apropos, READ_ONCE is now asymmetrical with WRITE_ONCE.
>
> I can read a pointer with READ_ONCE and be sure the value
> is sane, but only if I also remember to put in smp_wmb before
> WRITE_ONCE. Otherwise the pointer is ok but no guarantees
> about the data pointed to.
That was already the case on
2020 Jun 30
2
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
...te:
> +#define __READ_ONCE(x) \
> +({ \
> + int atomic = 1; \
> + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \
> + typeof(&(x)) __x = &(x); \
> + switch (sizeof(x)) { \
...
> + atomic ? (typeof(x))__u.__val : (*(volatile typeof(x) *)__x); \
> +})
This expands (x) nine ti...
2020 Jun 30
2
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
...te:
> +#define __READ_ONCE(x) \
> +({ \
> + int atomic = 1; \
> + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \
> + typeof(&(x)) __x = &(x); \
> + switch (sizeof(x)) { \
...
> + atomic ? (typeof(x))__u.__val : (*(volatile typeof(x) *)__x); \
> +})
This expands (x) nine ti...
2007 Oct 31
26
[Bug 1386] New: OpenSSH 4.7p1 compile error in atomicio.c under Tru64 4.0f
https://bugzilla.mindrot.org/show_bug.cgi?id=1386
Summary: OpenSSH 4.7p1 compile error in atomicio.c under Tru64
4.0f
Classification: Unclassified
Product: Portable OpenSSH
Version: 4.7p1
Platform: Alpha
OS/Version: Tru64
Status: NEW
Severity: major
Priority: P2
Component: Build
2020 Jul 01
0
[PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y
...ne __READ_ONCE(x) \
> > +({ \
> > + int atomic = 1; \
> > + union { __unqual_scalar_typeof(x) __val; char __c[1]; } __u; \
> > + typeof(&(x)) __x = &(x); \
> > + switch (sizeof(x)) { \
> ...
> > + atomic ? (typeof(x))__u.__val : (*(volatile typeof(x) *)__x); \
> > +})...