search for: size_t

Displaying 20 results from an estimated 6939 matches for "size_t".

2020 Aug 18
3
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...ions(+), 56 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 2f22326ee4df..25fbacab23c3 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2513,7 +2513,8 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, size_t page_size, - struct iommu_iotlb_gather *gather) + struct iommu_iotlb_gather *gather, + struct page **freelist) { struct protection_domain *domain = to_pdomain(dom); struct domain_pgtable pgta...
2020 Aug 18
3
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...ions(+), 56 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 2f22326ee4df..25fbacab23c3 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2513,7 +2513,8 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, size_t page_size, - struct iommu_iotlb_gather *gather) + struct iommu_iotlb_gather *gather, + struct page **freelist) { struct protection_domain *domain = to_pdomain(dom); struct domain_pgtable pgta...
2012 Sep 12
2
[LLVMdev] [cfe-dev] SPIR Portability Discussion
...t cs.uiuc.edu; llvmdev at cs.uiuc.edu > >> Subject: Re: [cfe-dev] [LLVMdev] SPIR Portability Discussion > >> > >> On Wed, Sep 12, 2012 at 2:58 PM, Villmow, Micah > <Micah.Villmow at amd.com> > >> wrote: > >> > Another factor to consider, with size_t etc as defined in SPIR, is > >> the usual > >> > arithmetic conversions. For instance (assuming a 64-bit long > long), > >> > sizeof(int) + 1LL would be signed if size_t is 32 bits wide, and > >> would be > >> > unsigned if size_t is 64 bits...
2012 Sep 12
0
[LLVMdev] [cfe-dev] SPIR Portability Discussion
...; Cc: Richard Smith; cfe-dev at cs.uiuc.edu; llvmdev at cs.uiuc.edu >> Subject: Re: [cfe-dev] [LLVMdev] SPIR Portability Discussion >> >> On Wed, Sep 12, 2012 at 2:58 PM, Villmow, Micah <Micah.Villmow at amd.com> >> wrote: >> > Another factor to consider, with size_t etc as defined in SPIR, is >> the usual >> > arithmetic conversions. For instance (assuming a 64-bit long long), >> > sizeof(int) + 1LL would be signed if size_t is 32 bits wide, and >> would be >> > unsigned if size_t is 64 bits wide. How is this handled? &gt...
2019 Dec 21
0
[PATCH 4/8] iommu: Handle freelists when using deferred flushing in iommu drivers
...ions(+), 57 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index bd25674ee4db..e8a4c0842624 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2542,7 +2542,8 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, size_t page_size, - struct iommu_iotlb_gather *gather) + struct iommu_iotlb_gather *gather, + struct page **freelist) { struct protection_domain *domain = to_pdomain(dom); @@ -2668,6 +2669,16 @@ sta...
2020 Aug 18
0
[PATCH V2 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...-git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c > index 2f22326ee4df..25fbacab23c3 100644 > --- a/drivers/iommu/amd/iommu.c > +++ b/drivers/iommu/amd/iommu.c > @@ -2513,7 +2513,8 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, > > static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, > size_t page_size, > - struct iommu_iotlb_gather *gather) > + struct iommu_iotlb_gather *gather, > + struct page **freelist) > { > struct protection_domain *domain = to_pdomain(d...
2012 Sep 12
4
[LLVMdev] [cfe-dev] SPIR Portability Discussion
...cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu> > Subject: Re: [cfe-dev] [LLVMdev] SPIR Portability Discussion > > On Wed, Sep 12, 2012 at 2:58 PM, Villmow, Micah <Micah.Villmow at amd.com<mailto:Micah.Villmow at amd.com>> > wrote: > > Another factor to consider, with size_t etc as defined in SPIR, is > the usual > > arithmetic conversions. For instance (assuming a 64-bit long long), > > sizeof(int) + 1LL would be signed if size_t is 32 bits wide, and > would be > > unsigned if size_t is 64 bits wide. How is this handled? > > > > [Vi...
2012 Sep 12
0
[LLVMdev] [cfe-dev] SPIR Portability Discussion
...t cs.uiuc.edu >> >> Subject: Re: [cfe-dev] [LLVMdev] SPIR Portability Discussion >> >> >> >> On Wed, Sep 12, 2012 at 2:58 PM, Villmow, Micah >> <Micah.Villmow at amd.com> >> >> wrote: >> >> > Another factor to consider, with size_t etc as defined in SPIR, is >> >> the usual >> >> > arithmetic conversions. For instance (assuming a 64-bit long >> long), >> >> > sizeof(int) + 1LL would be signed if size_t is 32 bits wide, and >> >> would be >> >> > unsign...
2020 Aug 17
1
[PATCH 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
...ions(+), 55 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 2f22326ee4df..25fbacab23c3 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2513,7 +2513,8 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, size_t page_size, - struct iommu_iotlb_gather *gather) + struct iommu_iotlb_gather *gather, + struct page **freelist) { struct protection_domain *domain = to_pdomain(dom); struct domain_pgtable pgta...
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...ta for mmap replacement */ void *p_winmap; #endif + + struct { + pthread_mutex_t mutex; + iconv_t *handle; + } iconv_cache[4]; }; /* Format of registry blocks. NB. All fields are little endian. */ @@ -282,17 +296,16 @@ extern void _hivex_free_offset_list (offset_list *list); extern size_t * _hivex_return_offset_list (offset_list *list); extern void _hivex_print_offset_list (offset_list *list, FILE *fp); +/* handle.c */ +extern iconv_t * _hivex_get_iconv (hive_h *h, recode_type r); +extern void _hivex_release_iconv (hive_h *h, recode_type r); + /* utf16.c */ -extern char * _hive...
2001 Oct 18
2
Incorrect return types for snprintf() and vsnprintf()
...eers, Scott Rankin *** /openbsd-compat/bsd-snprintf.c.orig Thu Oct 18 13:57:51 2001 --- /openbsd-compat/bsd-snprintf.c Thu Oct 18 13:58:26 2001 *************** *** 632,638 **** #endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ #ifndef HAVE_VSNPRINTF ! int vsnprintf(char *str, size_t count, const char *fmt, va_list args) { str[0] = 0; --- 632,638 ---- #endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */ #ifndef HAVE_VSNPRINTF ! size_t vsnprintf(char *str, size_t count, const char *fmt, va_list args) { str[0] = 0; *************** *** 643,649 **** #...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
...-- lib/hivex-internal.h | 8 +++++--- lib/utf16.c | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index 4135f58..64fd49a 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -268,11 +268,13 @@ extern size_t * _hivex_return_offset_list (offset_list *list); extern void _hivex_print_offset_list (offset_list *list, FILE *fp); /* utf16.c */ -extern char* _hivex_to_utf8 (/* const */ char *input, size_t len, char* input_encoding); +extern char* _hivex_recode (char *input_encoding, +...
2014 Oct 01
2
[LLVMdev] size_t?
I believe that we provide a definition of size_t inside the compiler itself when clang is in MSVC compatibility mode. On Tue, Sep 30, 2014 at 5:51 PM, Eric Mader <emader at gmx.us> wrote: > I did some more investigation of the size_t size error. I misunderstood > what was happening. It turns out that size_t is already defined befor...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...tc(f) fgetc(f) __extern int getc_unlocked(FILE *); #define getc_unlocked(f) fgetc(f) #define getchar() fgetc(stdin) +#define getchar_unlocked() getchar() __extern int ungetc(int, FILE *); __extern int printf(const char *, ...); @@ -86,17 +93,24 @@ __extern int remove(const char *); __extern size_t _fread(void *, size_t, FILE *); __extern size_t _fwrite(const void *, size_t, FILE *); __extern int fflush(FILE *); +__extern int fflush_unlocked(FILE *); __extern size_t fread(void *, size_t, size_t, FILE *); +__extern size_t fread_unlocked(void *, size_t, size_t, FILE *); __extern size_t fw...
2018 Jul 20
1
[PATCH 2/2] Fix safe_realloc_add_2op_() to free memory when reallocation fails
...- include/share/alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/share/alloc.h b/include/share/alloc.h index 914de9ba..63878db0 100644 --- a/include/share/alloc.h +++ b/include/share/alloc.h @@ -168,7 +168,7 @@ static inline void *safe_realloc_add_2op_(void *ptr, size_t size1, size_t size2) free(ptr); return 0; } - return realloc(ptr, size2); + return safe_realloc_(ptr, size2); } static inline void *safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3) -- 2.17.1
2014 Apr 30
2
[PATCH] daemon: xattr: factorize do_getxattr and do_lgetxattr
...++++++++------------------------------------------- 1 file changed, 11 insertions(+), 43 deletions(-) diff --git a/daemon/xattr.c b/daemon/xattr.c index abed5ff..d8ad59a 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -55,6 +55,7 @@ static guestfs_int_xattr_list *getxattrs (const char *path, ssize_t (*listxattr) static int _setxattr (const char *xattr, const char *val, int vallen, const char *path, int (*setxattr) (const char *path, const char *name, const void *value, size_t size, int flags)); static int _removexattr (const char *xattr, const char *path, int (*removexattr) (const char *path...
2015 May 01
6
[LLVMdev] Deduplication of memory allocation
...er return by reference for efficiency. Although I totally agree with him in most cases because pointers make it difficult for a compiler to optimise, I still don’t always have an efficient solution with value semantics. Here is the case that I am thinking of : ==== std::vector<double> f(std::size_t i); auto v = std::vector<double>( n ); for (std::size_t i = 0; i < 1000; ++i) { auto w = f(i); for (std::size_t k = 0; k < v.size(); ++k) { v[k] += w[k]; } } ==== which would be way slower than ==== void f(std::size_t i, std::vector<double>& w); auto v...
2014 Oct 01
2
[LLVMdev] size_t?
We inject a typedef for size_t here: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?revision=218230&view=markup#l206 The typedef type is determined by calling getSizeType(). SizeType is (relevantly) calculated in two places: X86_64 http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?revisio...
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2016 Jul 13
1
[PATCH v3 0/7] lib: string: add functions to case-convert strings
...length to mimic strcpy() > >> - converting the case of a string in-place (i.e. modifying the > >> string that was passed in) > >> > >> Consequently, I am proposing these new functions: > >> void strlcpytoupper(char *dst, const char *src, size_t len); > >> void strlcpytolower(char *dst, const char *src, size_t len); > >> void strcpytoupper(char *dst, const char *src); > >> void strcpytolower(char *dst, const char *src); > >> void strtoupper(char *s); > >> void strtolower...