search for: __typeof__

Displaying 20 results from an estimated 77 matches for "__typeof__".

2015 Nov 19
0
PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__
...s really in a git repository else use ChangeLog to determine the driver date to use. NB 'git log' should probably already be 'git log -1' 2. When using strict ISO C compilers, such as if using -std=c99 instead of for example -std=gnu99, typeof is not a valid keyword and __typeof__ should be used. Use AC_C_TYPEOF to automatically define a macro if necessary. cheers -- Richard PALO -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch Type: text/x-patch Size: 1385 bytes Desc: n...
2015 Nov 19
0
PATCH: Sense if git should be used (for tarball) and if typeof needs, to be __typeof__
...s really in a git repository else use ChangeLog to determine the driver date to use. NB 'git log' should probably already be 'git log -1' 2. When using strict ISO C compilers, such as if using -std=c99 instead of for example -std=gnu99, typeof is not a valid keyword and __typeof__ should be used. Use AC_C_TYPEOF to automatically define a macro if necessary. cheers -- Richard PALO -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch Type: text/x-patch Size: 1383 bytes Desc: n...
2015 Nov 19
0
PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__
...s really in a git repository else use ChangeLog to determine the driver date to use. NB 'git log' should probably already be 'git log -1' 2. When using strict ISO C compilers, such as if using -std=c99 instead of for example -std=gnu99, typeof is not a valid keyword and __typeof__ should be used. Use AC_C_TYPEOF to automatically define a macro if necessary. cheers -- Richard PALO -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch Type: text/x-patch Size: 1384 bytes Desc:...
2007 Jan 11
4
[PATCH] Cleanup asm-x86/guest_access.h
.../asm-x86/guest_access.h. I also fixed a bug in __copy_field_from_guest(), which seems to me to be a kind of cut-copy-paste bug. copy_{to,from}_user() and copy_{to,from}_user_hvm() expect a non-const argument as the first argument. So I remove the consts from the initializer. I replace typeof with __typeof__, which is always available in gcc - it is not, when the -ansi option is used. I do some explicit casts, which makes gcc errors more readable. In case, you pass an array by your mistake, which gets casted to a char *, then gcc tells you that rather just "invalid initializer". Christoph...
2009 Jan 24
5
[LLVMdev] inline asm semantics: output constraint width smaller than input
...unsigned long __val_gu; \ __chk_user_ptr(ptr); \ might_fault(); \ @@ -176,7 +176,7 @@ extern int __get_user_bad(void); break; \ } \ (x) = (__typeof__(*(ptr)))__val_gu; \ - __ret_gu; \ + (int)__ret_gu; \ }) #define __put_user_x(size, x, ptr, __ret_pu) \ @@ -239,11 +239,13 @@ extern void __put_user_8(void); */ #define put_user(x, ptr) \...
2009 Jan 24
0
[LLVMdev] inline asm semantics: output constraint width smaller than input
...\ > __chk_user_ptr(ptr); \ > might_fault(); \ > @@ -176,7 +176,7 @@ extern int __get_user_bad(void); > break; \ > } \ > (x) = (__typeof__(*(ptr)))__val_gu; \ > - __ret_gu; \ > + (int)__ret_gu; \ > }) > > #define __put_user_x(size, x, ptr, __ret_pu) \ > @@ -239,11 +239,13 @@ extern void __put_user_8(void); > */ > #defin...
2016 Dec 14
1
[PATCH V2] vhost: introduce O(1) vq metadata cache
...vhost_vq_meta_fetch(vq, + (u64)(uintptr_t)addr, size, type); + if (uaddr) + return uaddr; + + return __vhost_get_user_slow(vq, addr, size, type); +} + +#define vhost_put_user(vq, x, ptr) \ ({ \ int ret = -EFAULT; \ if (!vq->iotlb) { \ ret = __put_user(x, ptr); \ } else { \ __typeof__(ptr) to = \ - (__typeof__(ptr)) __vhost_get_user(vq, ptr, sizeof(*ptr)); \ + (__typeof__(ptr)) __vhost_get_user(vq, ptr, \ + sizeof(*ptr), VHOST_ADDR_USED); \ if (to != NULL) \ ret = __put_user(x, to); \ else \ @@ -829,14 +883,16 @@ static void __user *__vhost_get_user(struct vh...
2016 Dec 14
1
[PATCH V2] vhost: introduce O(1) vq metadata cache
...vhost_vq_meta_fetch(vq, + (u64)(uintptr_t)addr, size, type); + if (uaddr) + return uaddr; + + return __vhost_get_user_slow(vq, addr, size, type); +} + +#define vhost_put_user(vq, x, ptr) \ ({ \ int ret = -EFAULT; \ if (!vq->iotlb) { \ ret = __put_user(x, ptr); \ } else { \ __typeof__(ptr) to = \ - (__typeof__(ptr)) __vhost_get_user(vq, ptr, sizeof(*ptr)); \ + (__typeof__(ptr)) __vhost_get_user(vq, ptr, \ + sizeof(*ptr), VHOST_ADDR_USED); \ if (to != NULL) \ ret = __put_user(x, to); \ else \ @@ -829,14 +883,16 @@ static void __user *__vhost_get_user(struct vh...
2016 Dec 14
2
[PATCH] vhost: introduce O(1) vq metadata cache
...vhost_vq_meta_fetch(vq, + (u64)(uintptr_t)addr, size, type); + if (uaddr) + return uaddr; + + return __vhost_get_user_slow(vq, addr, size, type); +} + +#define vhost_put_user(vq, x, ptr) \ ({ \ int ret = -EFAULT; \ if (!vq->iotlb) { \ ret = __put_user(x, ptr); \ } else { \ __typeof__(ptr) to = \ - (__typeof__(ptr)) __vhost_get_user(vq, ptr, sizeof(*ptr)); \ + (__typeof__(ptr)) __vhost_get_user(vq, ptr, \ + sizeof(*ptr), VHOST_ADDR_USED); \ if (to != NULL) \ ret = __put_user(x, to); \ else \ @@ -829,14 +883,16 @@ static void __user *__vhost_get_user(struct vh...
2016 Dec 14
2
[PATCH] vhost: introduce O(1) vq metadata cache
...vhost_vq_meta_fetch(vq, + (u64)(uintptr_t)addr, size, type); + if (uaddr) + return uaddr; + + return __vhost_get_user_slow(vq, addr, size, type); +} + +#define vhost_put_user(vq, x, ptr) \ ({ \ int ret = -EFAULT; \ if (!vq->iotlb) { \ ret = __put_user(x, ptr); \ } else { \ __typeof__(ptr) to = \ - (__typeof__(ptr)) __vhost_get_user(vq, ptr, sizeof(*ptr)); \ + (__typeof__(ptr)) __vhost_get_user(vq, ptr, \ + sizeof(*ptr), VHOST_ADDR_USED); \ if (to != NULL) \ ret = __put_user(x, to); \ else \ @@ -829,14 +883,16 @@ static void __user *__vhost_get_user(struct vh...
2009 Jan 24
1
[LLVMdev] inline asm semantics: output constraint width smaller than input
On 2009-01-24 19:27, Ingo Molnar wrote: > * Török Edwin <edwintorok at gmail.com> wrote: > >> #define put_user(x, ptr) \ >> ({ \ >> - int __ret_pu; \ >> + __typeof__(*(ptr)) __ret_pu; \ >> > > This does not look right. We can sometimes have put_user() of non-integer > types (say structures). I didn't encounter it with my .config, but it is certainly possible. I think using __builtin_choose_expr would be better than the...
2007 Mar 27
0
[PATCH] make all performance counter per-cpu
...ous\n" \ - : : "b" (_call) \ + : \ + : "b" (_call), \ + "i" (offsetof(__typeof__(*_call), op)), \ + "i" (offsetof(__typeof__(*_call), args)), \ + "i" (sizeof(*(_call)->args)), \ + "i" (offsetof(__typeof__(*_call), result)) \ /* all the caller-saves registers *...
2018 Apr 27
3
[libvirt] ignore_value
Hi,using ignore_value in libvirt source code to do function return value processing,but I can’t understand about it,can you give me some tips?thanks very much!
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...private/macros.h b/src/libFLAC/include/private/macros.h new file mode 100644 index 0000000..1718005 --- /dev/null +++ b/src/libFLAC/include/private/macros.h @@ -0,0 +1,29 @@ +#ifndef FLAC__PRIVATE__MACROS_H +#define FLAC__PRIVATE__MACROS_H + +#if defined(__GNUC__) + +#define flac_max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) + +#define flac_min(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a < _b ? _a : _b; }) + +/* Whatever other unix that has sys/param.h */ +#elif defined(HAVE_SYS_PARAM_H) +#include <...
2016 Jun 22
0
[PATCH 3/3] vhost: device IOTLB API
...uot;0x%llx size 0x%llx\n", + (unsigned long long) addr, + (unsigned long long) size); + return NULL; + } + + return vq->iotlb_iov[0].iov_base; +} + +#define vhost_put_user(vq, x, ptr) \ +({ \ + int ret = -EFAULT; \ + if (!vq->iotlb) { \ + ret = __put_user(x, ptr); \ + } else { \ + __typeof__(ptr) to = \ + (__typeof__(ptr)) __vhost_get_user(vq, ptr, sizeof(*ptr)); \ + if (to != NULL) \ + ret = __put_user(x, to); \ + else \ + ret = -EFAULT; \ + } \ + ret; \ +}) + +#define vhost_get_user(vq, x, ptr) \ +({ \ + int ret; \ + if (!vq->iotlb) { \ + ret = __get_user(x, ptr); \ + } e...
2009 Jul 06
1
libsieve compilation error on AIX 5.3
Dovecot revision: 9186:f70192e7ff3c libsieve revision: 958:e86a81f4bf28 Using IBM c compiler version 8. Trying to compile libsieve(64 bit mode if it matters): "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier last. "sieve-ast.c", line 302.9: 1506-045 (S) Undeclared identifier result. "sieve-ast.c", line 320.9: 1506-275 (S) Unexpected text node
2009 Jan 27
0
[LLVMdev] inline asm semantics: output constraint width smaller than input
...m volatile("call __put_user_" #size : "=a" (__ret_pu) \ :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") #define put_user(x, ptr) \ ({ \ int __ret_pu; \ __typeof__(*(ptr)) __pu_val; \ __chk_user_ptr(ptr); \ __pu_val = x; \ switch (sizeof(*(ptr))) { \ case 1: \ __put_user_x(1, __pu_val, ptr, __ret_pu); \ break;...
2012 Oct 23
0
[LLVMdev] Status of YAML IO?
......); #if __has_feature(cxx_access_control_sfinae) template <class U, class X> static auto test(U& u, X& x) -> decltype(U::output(std::declval<const X&>(), std::declval<llvm::raw_ostream&>()), char()); #else template <class U, class X> static __typeof__(U::output(std::declval<const X&>(), std::declval<llvm::raw_ostream&>()), char()) test(U& u, X& x); #endif public: static const bool value = (sizeof(test(std::declval<ScalarTraits<T>&>(), std::declval<T&>())) == 1); }; -Nick
2012 Oct 22
2
[LLVMdev] Status of YAML IO?
Hey Nick, what's the status on YAML IO? The other thread seems to have died. -- Sean Silva
2009 Jan 27
3
[LLVMdev] inline asm semantics: output constraint width smaller than input
On Tuesday 27 January 2009 20:56:30 Mike Stump wrote: > On Jan 27, 2009, at 8:42 PM, Duncan Sands wrote: > > one thing that seems to be clear to everyone except me is... what > > are the > > semantics supposed to be? > > I don't know of any other semantic other than, if they are supposed to > be in the same register, then they have to be in the same register.