repo stringlengths 1 152 ⌀ | file stringlengths 14 221 | code stringlengths 501 25k | file_length int64 501 25k | avg_line_length float64 20 99.5 | max_line_length int64 21 134 | extension_type stringclasses 2
values |
|---|---|---|---|---|---|---|
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_memcpy/memcpy_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* memcpy_common.h -- header file for common memcpy utilities
*/
#ifndef MEMCPY_COMMON_H
#define MEMCPY_COMMON_H 1
#include "unittest.h"
#include "file.h"
typedef void *(*memcpy_fn)(void *pmemdest, const void *src, size_t len,
uns... | 611 | 23.48 | 73 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_memcpy/pmem2_memcpy.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* pmem2_memcpy.c -- test for doing a memcpy from libpmem2
*
* usage: pmem2_memcpy file destoff srcoff length
*
*/
#include "unittest.h"
#include "file.h"
#include "ut_pmem2.h"
#include "memcpy_common.h"
/*
* do_memcpy_variants ... | 2,527 | 22.849057 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/util_is_zeroed/util_is_zeroed.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* util_is_zeroed.c -- unit test for util_is_zeroed
*/
#include "unittest.h"
#include "util.h"
int
main(int argc, char *argv[])
{
START(argc, argv, "util_is_zeroed");
util_init();
char bigbuf[3000];
memset(bigbuf + 0, 0x11,... | 1,196 | 20.763636 | 53 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem_map_file/mocks_windows.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2017, Intel Corporation */
/*
* mocks_windows.h -- redefinitions of libc functions
*
* This file is Windows-specific.
*
* This file should be included (i.e. using Forced Include) by libpmem
* files, when compiled for the purpose of pmem_map_file test.
*... | 608 | 28 | 72 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem_map_file/mocks_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2017, Intel Corporation */
/*
* mocks_windows.c -- mocked functions used in pmem_map_file.c
* (Windows-specific)
*/
#include "unittest.h"
#define MAX_LEN (4 * 1024 * 1024)
/*
* posix_fallocate -- interpose on libc posix_fallocate()
*... | 868 | 21.868421 | 73 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_heap/obj_heap.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_heap.c -- unit test for heap
*
* operations are: 't', 'b', 'r', 'c', 'h', 'a', 'n', 's'
* t: do test_heap, test_recycler
* b: do fault_injection in function container_new_ravl
* r: do fault_injection in function recycl... | 16,917 | 25.027692 | 72 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_movnt_align/movnt_align_common.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* movnt_align_common.c -- common part for tests doing a persistent movnt align
*/
#include "unittest.h"
#include "movnt_align_common.h"
char *Src;
char *Dst;
char *Scratch;
/*
* check_memmove -- invoke check function with pm... | 1,830 | 21.060241 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_movnt_align/pmem2_movnt_align.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* pmem2_movnt_align.c -- test for functions with non-temporal stores
*
* usage: pmem2_movnt_align file [C|F|B|S]
*
* C - pmem2_memcpy()
* B - pmem2_memmove() in backward direction
* F - pmem2_memmove() in forward direction
* S ... | 5,283 | 24.042654 | 69 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_movnt_align/movnt_align_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* movnt_align_common.h -- header file for common movnt_align test utilities
*/
#ifndef MOVNT_ALIGN_COMMON_H
#define MOVNT_ALIGN_COMMON_H 1
#include "unittest.h"
#include "file.h"
#define N_BYTES (Ut_pagesize * 2)
extern char *Src;... | 989 | 26.5 | 80 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem_memmove/pmem_memmove.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* pmem_memmove.c -- unit test for doing a memmove
*
* usage:
* pmem_memmove file b:length [d:{offset}] [s:offset] [o:{1|2} S:{overlap}]
*
*/
#include "unittest.h"
#include "util_pmem.h"
#include "file.h"
#include "memmove_c... | 5,226 | 22.334821 | 75 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_ctl_heap_size/obj_ctl_heap_size.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017, Intel Corporation */
/*
* obj_ctl_heap_size.c -- tests for the ctl entry points: heap.size.*
*/
#include "unittest.h"
#define LAYOUT "obj_ctl_heap_size"
#define CUSTOM_GRANULARITY ((1 << 20) * 10)
#define OBJ_SIZE 1024
int
main(int argc, char *argv[])
{
... | 1,500 | 21.402985 | 69 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_basic_integration/obj_basic_integration.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_basic_integration.c -- Basic integration tests
*
*/
#include <stddef.h>
#include "unittest.h"
#include "obj.h"
#define TEST_STR "abcdefgh"
#define TEST_STR_LEN 8
#define TEST_VALUE 5
/*
* Layout definition
*/
POBJ_L... | 17,784 | 25.154412 | 68 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_pmemcheck/obj_pmemcheck.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
#include "unittest.h"
#include "valgrind_internal.h"
struct foo {
PMEMmutex bar;
};
static void
test_mutex_pmem_mapping_register(PMEMobjpool *pop)
{
PMEMoid foo;
int ret = pmemobj_alloc(pop, &foo, sizeof(struct foo), 0, NULL, NULL);
... | 1,127 | 21.56 | 71 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmreorder_simple/pmreorder_simple.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* pmreorder_simple.c -- a simple unit test for store reordering
*
* usage: pmreorder_simple g|b|c|m file
* g - write data in a consistent manner
* b - write data in a possibly inconsistent manner
* c - check data consistency
* m... | 3,335 | 24.082707 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/remote_obj_basic/remote_obj_basic.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, Intel Corporation */
/*
* remote_obj_basic.c -- unit test for remote tests support
*
* usage: remote_obj_basic <create|open> <poolset-file>
*/
#include "unittest.h"
#define LAYOUT_NAME "remote_obj_basic"
int
main(int argc, char *argv[])
{
PMEMobjpool ... | 1,019 | 20.25 | 62 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_ctl_debug/obj_ctl_debug.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* obj_ctl_debug.c -- tests for the ctl debug namesapce entry points
*/
#include "unittest.h"
#include "../../libpmemobj/obj.h"
#define LAYOUT "obj_ctl_debug"
#define BUFFER_SIZE 128
#define ALLOC_PATTERN 0xAC
static void
test_allo... | 1,452 | 20.367647 | 68 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_list_macro/obj_list_macro.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* obj_list_macro.c -- unit tests for list module
*/
#include <stddef.h>
#include "libpmemobj.h"
#include "unittest.h"
TOID_DECLARE(struct item, 0);
TOID_DECLARE(struct list, 1);
struct item {
int id;
POBJ_LIST_ENTRY(struct... | 9,625 | 21.756501 | 68 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_critnib_mt/obj_critnib_mt.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* obj_critnib_mt.c -- multithreaded unit test for critnib
*/
#include <errno.h>
#include "critnib.h"
#include "rand.h"
#include "os_thread.h"
#include "unittest.h"
#include "util.h"
#include "valgrind_internal.h"
#define NITE... | 5,467 | 20.527559 | 72 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_ctl_arenas/obj_ctl_arenas.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* obj_ctl_arenas.c -- tests for the ctl entry points
* usage:
* obj_ctl_arenas <file> n - test for heap.narenas.total
*
* obj_ctl_arenas <file> s - test for heap.arena.[idx].size
* and heap.thread.arena_id (RW)
*
* obj_ctl... | 11,314 | 23.651416 | 66 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/win_poolset_unmap/win_poolset_unmap.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* win_poolset_unmap.c -- test for windows mmap destructor.
*
* It checks whether all mappings are properly unmpapped and memory is properly
* unreserved when auto growing pool is used.
*/
#include "unittest.h"
#include "os.h"
#in... | 2,117 | 25.810127 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_compat/pmem2_compat.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* pmem2_compat.c -- compatibility test for libpmem vs libpmem2
*/
#include "unittest.h"
int
main(int argc, char *argv[])
{
UT_COMPILE_ERROR_ON(PMEM_F_MEM_NODRAIN != PMEM2_F_MEM_NODRAIN);
UT_COMPILE_ERROR_ON(PMEM_F_MEM_NONTEMPORAL... | 606 | 26.590909 | 72 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_tx_strdup/obj_tx_strdup.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_tx_strdup.c -- unit test for pmemobj_tx_strdup
*/
#include <sys/param.h>
#include <string.h>
#include <wchar.h>
#include "unittest.h"
#define LAYOUT_NAME "tx_strdup"
TOID_DECLARE(char, 0);
TOID_DECLARE(wchar_t, 1);
enu... | 11,087 | 24.315068 | 74 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_tx_realloc/obj_tx_realloc.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* obj_tx_realloc.c -- unit test for pmemobj_tx_realloc and pmemobj_tx_zrealloc
*/
#include <sys/param.h>
#include <string.h>
#include "unittest.h"
#include "util.h"
#define LAYOUT_NAME "tx_realloc"
#define TEST_VALUE_1 1
#def... | 12,874 | 25.767152 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_tx_lock/obj_tx_lock.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* obj_tx_lock.c -- unit test for pmemobj_tx_lock()
*/
#include "unittest.h"
#include "libpmemobj.h"
#include "obj.h"
#define LAYOUT_NAME "obj_tx_lock"
#define NUM_LOCKS 2
struct transaction_data {
PMEMmutex mutexes[NUM_LOCKS... | 7,003 | 24.75 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_memops/obj_memops.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* obj_memops.c -- basic memory operations tests
*
*/
#include <stddef.h>
#include "obj.h"
#include "memops.h"
#include "ulog.h"
#include "unittest.h"
#define TEST_ENTRIES 256
#define TEST_VALUES TEST_ENTRIES
enum fail_types... | 15,904 | 23.319572 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_strdup/obj_strdup.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* obj_strdup.c -- unit test for pmemobj_strdup
*/
#include <sys/param.h>
#include <string.h>
#include <wchar.h>
#include "unittest.h"
#include "libpmemobj.h"
#define LAYOUT_NAME "strdup"
TOID_DECLARE(char, 0);
TOID_DECLARE(wc... | 5,017 | 26.571429 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem_is_pmem/pmem_is_pmem.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
/*
* Copyright (c) 2016, Microsoft Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* ... | 3,216 | 30.23301 | 74 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/rpmem_obc_int/rpmem_obc_int.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* rpmem_obc_int.c -- integration test for rpmem_obc and rpmemd_obc modules
*/
#include "unittest.h"
#include "pmemcommon.h"
#include "librpmem.h"
#include "rpmem.h"
#include "rpmem_proto.h"
#include "rpmem_common.h"
#include "... | 8,537 | 20.780612 | 75 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/mmap_fixed/mmap_fixed.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* mmap_fixed.c -- test memory mapping with MAP_FIXED for various lengths
*
* This test is intended to be used for testing Windows implementation
* of memory mapping routines - mmap(), munmap(), msync() and mprotect().
* Those... | 2,522 | 26.129032 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_movnt/pmem2_movnt.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* pmem2_movnt.c -- test for MOVNT threshold
*
* usage: pmem2_movnt
*/
#include "unittest.h"
#include "ut_pmem2.h"
int
main(int argc, char *argv[])
{
int fd;
char *dst;
char *src;
struct pmem2_config *cfg;
struct pmem2_source... | 1,945 | 21.113636 | 59 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_memmove/pmem2_memmove.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* pmem2_memmove.c -- test for doing a memmove
*
* usage:
* pmem2_memmove file b:length [d:{offset}] [s:offset] [o:{1|2} S:{overlap}]
*
*/
#include "unittest.h"
#include "ut_pmem2.h"
#include "file.h"
#include "memmove_commo... | 3,184 | 20.52027 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_memmove/memmove_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* memmove_common.h -- header file for common memmove_common test utilities
*/
#ifndef MEMMOVE_COMMON_H
#define MEMMOVE_COMMON_H 1
#include "unittest.h"
#include "file.h"
extern unsigned Flags[10];
#define USAGE() do { UT_FATAL("us... | 832 | 25.870968 | 75 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_memmove/memmove_common.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* memmove_common.c -- common part for tests doing a persistent memmove
*/
#include "unittest.h"
#include "memmove_common.h"
/*
* verify_contents -- verify that buffers match, if they don't - print contents
* of both and abor... | 3,503 | 28.694915 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_zones/obj_zones.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_zones.c -- allocates from a very large pool (exceeding 1 zone)
*
*/
#include <stddef.h>
#include <page_size.h>
#include "unittest.h"
#define LAYOUT_NAME "obj_zones"
#define ALLOC_SIZE ((8191 * (256 * 1024)) - 16) /* m... | 2,706 | 20.148438 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_tx_locks_abort/obj_tx_locks_abort.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2018, Intel Corporation */
/*
* obj_tx_locks_nested.c -- unit test for transaction locks
*/
#include "unittest.h"
#define LAYOUT_NAME "locks"
TOID_DECLARE_ROOT(struct root_obj);
TOID_DECLARE(struct obj, 1);
struct root_obj {
PMEMmutex lock;
TOID(struct ... | 2,994 | 20.392857 | 71 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_persist_valgrind/pmem2_persist_valgrind.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* pmem2_persist_valgrind.c -- pmem2_persist_valgrind tests
*/
#include "out.h"
#include "unittest.h"
#include "ut_pmem2_utils.h"
#define DATA "XXXXXXXX"
#define STRIDE_SIZE 4096
/*
* test_ctx -- essential parameters used by test
... | 5,072 | 22.37788 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_ctl_alloc_class/obj_ctl_alloc_class.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2018, Intel Corporation */
/*
* obj_ctl_alloc_class.c -- tests for the ctl entry points: heap.alloc_class
*/
#include <sys/resource.h>
#include "unittest.h"
#define LAYOUT "obj_ctl_alloc_class"
static void
basic(const char *path)
{
PMEMobjpool *pop;
if... | 7,857 | 26.865248 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/traces_pmem/traces_pmem.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */
/*
* traces_pmem.c -- unit test traces for libraries pmem
*/
#include "unittest.h"
int
main(int argc, char *argv[])
{
START(argc, argv, "traces_pmem");
UT_ASSERT(!pmem_check_version(PMEM_MAJOR_VERSION,
PMEM_MINOR_VERSION))... | 596 | 21.961538 | 56 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_debug/obj_debug.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2017, Intel Corporation */
/*
* obj_debug.c -- unit test for debug features
*
* usage: obj_debug file operation [op_index]:...
*
* operations are 'f' or 'l' or 'r' or 'a' or 'n' or 's'
*
*/
#include <stddef.h>
#include <stdlib.h>
#include <sys/param.h>
... | 8,098 | 20.771505 | 72 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem2_config/pmem2_config.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* pmem_config.c -- pmem2_config unittests
*/
#include "fault_injection.h"
#include "unittest.h"
#include "ut_pmem2.h"
#include "config.h"
#include "out.h"
#include "source.h"
/*
* test_cfg_create_and_delete_valid - test pmem2_... | 9,397 | 22.792405 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/pmem_map_file_trunc/pmem_map_file_trunc.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* pmem_map_file_trunc.c -- test for mapping specially crafted files,
* which used to confuse Windows libc to truncate it by 1 byte
*
* See https://github.com/pmem/pmdk/pull/3728 for full description.
*
* usage: pmem_map_file_trun... | 1,302 | 20.716667 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/util_ravl/util_ravl.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* util_ravl.c -- unit test for ravl tree
*/
#include <stdint.h>
#include <stdlib.h>
#include "ravl.h"
#include "util.h"
#include "unittest.h"
#include "fault_injection.h"
static int
cmpkey(const void *lhs, const void *rhs)
{
... | 5,271 | 20.34413 | 64 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_sync/mocks_windows.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2017, Intel Corporation */
/*
* Copyright (c) 2016, Microsoft Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* ... | 2,265 | 41.754717 | 74 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_sync/obj_sync.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_sync.c -- unit test for PMEM-resident locks
*/
#include "obj.h"
#include "sync.h"
#include "unittest.h"
#include "sys_util.h"
#include "util.h"
#include "os.h"
#define MAX_THREAD_NUM 200
#define DATA_SIZE 128
#define LO... | 8,776 | 21.97644 | 78 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_sync/mocks_posix.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2018, Intel Corporation */
/*
* mocks_posix.c -- redefinitions of lock functions (Posix implementation)
*/
#include <pthread.h>
#include "util.h"
#include "os.h"
#include "unittest.h"
FUNC_MOCK(pthread_mutex_init, int,
pthread_mutex_t *__restrict mutex,... | 950 | 22.775 | 74 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/out_err_mt_win/out_err_mt_win.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* out_err_mt_win.c -- unit test for error messages
*/
#include <sys/types.h>
#include <stdarg.h>
#include <errno.h>
#include "unittest.h"
#include "valgrind_internal.h"
#include "util.h"
#define NUM_THREADS 16
static void
pri... | 3,844 | 22.30303 | 70 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/test/obj_oid_thread/obj_oid_thread.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_oid_thread.c -- unit test for the reverse direct operation
*/
#include "unittest.h"
#include "lane.h"
#include "obj.h"
#include "sys_util.h"
#define MAX_PATH_LEN 255
#define LAYOUT_NAME "direct"
static os_mutex_t lock;
s... | 3,186 | 21.602837 | 66 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_fip_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* rpmem_fip_common.h -- common definitions for librpmem and rpmemd
*/
#ifndef RPMEM_FIP_COMMON_H
#define RPMEM_FIP_COMMON_H 1
#include <string.h>
#include <netinet/in.h>
#include <rdma/fabric.h>
#include <rdma/fi_cm.h>
#inclu... | 1,992 | 21.144444 | 76 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_fip_common.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* rpmem_common.c -- common definitions for librpmem and rpmemd
*/
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <errno.h>
#include "rpmem_common.h"
#include "rpmem_fip_common.h"
#inclu... | 7,550 | 21.675676 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_common_log.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, Intel Corporation */
/*
* rpmem_common_log.h -- common log macros for librpmem and rpmemd
*/
#if defined(RPMEMC_LOG_RPMEM) && defined(RPMEMC_LOG_RPMEMD)
#error Both RPMEMC_LOG_RPMEM and RPMEMC_LOG_RPMEMD defined
#elif !defined(RPMEMC_LOG_RPMEM) && !defin... | 1,160 | 28.769231 | 71 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* rpmem_common.h -- common definitions for librpmem and rpmemd
*/
#ifndef RPMEM_COMMON_H
#define RPMEM_COMMON_H 1
/*
* Values for SO_KEEPALIVE socket option
*/
#define RPMEM_CMD_ENV "RPMEM_CMD"
#define RPMEM_SSH_ENV "RPMEM_... | 3,404 | 23.321429 | 72 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_proto.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* rpmem_proto.h -- rpmem protocol definitions
*/
#ifndef RPMEM_PROTO_H
#define RPMEM_PROTO_H 1
#include <stdint.h>
#include <endian.h>
#include "librpmem.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PACKED __attribute_... | 15,016 | 26.503663 | 80 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_fip_lane.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2017, Intel Corporation */
/*
* rpmem_fip_lane.h -- rpmem fabric provider lane definition
*/
#include <sched.h>
#include <stdint.h>
#include "sys_util.h"
/*
* rpmem_fip_lane -- basic lane structure
*
* This structure consist of a synchronization object a... | 2,754 | 20.523438 | 75 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/rpmem_common/rpmem_fip_msg.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* rpmem_fip_msg.h -- simple wrappers for fi_rma(3) and fi_msg(3) functions
*/
#ifndef RPMEM_FIP_MSG_H
#define RPMEM_FIP_MSG_H 1
#include <rdma/fi_rma.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* rpmem_fip_rma -- helper st... | 3,494 | 22.77551 | 75 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/libpmempool.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* libpmempool.c -- entry points for libpmempool
*/
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
#include <sys/param.h>
#include "pmemcommon.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#inc... | 9,142 | 20.873206 | 78 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/replica.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* replica.h -- module for synchronizing and transforming poolset
*/
#ifndef REPLICA_H
#define REPLICA_H
#include "libpmempool.h"
#include "pool.h"
#include "badblocks.h"
#ifdef __cplusplus
extern "C" {
#endif
#define UNDEF_RE... | 6,216 | 28.325472 | 80 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_blk.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* check_blk.c -- check pmemblk
*/
#include <inttypes.h>
#include <sys/param.h>
#include <endian.h>
#include "out.h"
#include "btt.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "check_util.h"
enu... | 5,277 | 21.176471 | 78 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_sds.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* check_shutdown_state.c -- shutdown state check
*/
#include <stdio.h>
#include <inttypes.h>
#include <sys/mman.h>
#include <endian.h>
#include "out.h"
#include "util_pmem.h"
#include "libpmempool.h"
#include "libpmem.h"
#incl... | 6,571 | 21.662069 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_log.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* check_log.c -- check pmemlog
*/
#include <inttypes.h>
#include <sys/param.h>
#include <endian.h>
#include "out.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "check_util.h"
enum question {
Q_L... | 4,760 | 21.671429 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_util.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* check_util.h -- internal definitions check util
*/
#ifndef CHECK_UTIL_H
#define CHECK_UTIL_H
#include <time.h>
#include <limits.h>
#include <sys/param.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CHECK_STEP_COMPLETE UI... | 5,143 | 25.111675 | 78 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_bad_blocks.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* check_bad_blocks.c -- pre-check bad_blocks
*/
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include "out.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "check_util.h"
#include "se... | 1,329 | 20.803279 | 127 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/feature.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018, Intel Corporation */
/*
* feature.c -- implementation of pmempool_feature_(enable|disable|query)()
*/
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include "libpmempool.h"
#include "util_pmem.h"
#inc... | 17,344 | 20.955696 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_btt_map_flog.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* check_btt_map_flog.c -- check BTT Map and Flog
*/
#include <stdint.h>
#include <sys/param.h>
#include <endian.h>
#include "out.h"
#include "btt.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "ch... | 15,734 | 21.937318 | 73 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_backup.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* check_backup.c -- pre-check backup
*/
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include "out.h"
#include "file.h"
#include "os.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "... | 7,968 | 20.654891 | 103 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_btt_info.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* check_btt_info.c -- check BTT Info
*/
#include <stdlib.h>
#include <stdint.h>
#include <endian.h>
#include "out.h"
#include "util.h"
#include "btt.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include ... | 11,735 | 22.011765 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/check_util.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* check_util.c -- check utility functions
*/
#include <stdio.h>
#include <stdint.h>
#include "out.h"
#include "libpmempool.h"
#include "pmempool.h"
#include "pool.h"
#include "check_util.h"
#define CHECK_END UINT_MAX
/* sepa... | 15,575 | 22.247761 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/pool.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* pool.h -- internal definitions for pool processing functions
*/
#ifndef POOL_H
#define POOL_H
#include <stdbool.h>
#include <sys/types.h>
#include "libpmemobj.h"
#include "queue.h"
#include "set.h"
#include "log.h"
#includ... | 3,712 | 21.640244 | 80 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmempool/pool.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* pool.c -- pool processing functions
*/
#include <stdio.h>
#include <stdint.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <endian.h>
#ifndef _WIN32
#include <sys/ioctl.h>
#ifdef __FreeBSD__
#include... | 24,738 | 21.009786 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem/pmem.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
/*
* pmem.c -- pmem entry points for libpmem
*
*
* PERSISTENT MEMORY INSTRUCTIONS ON X86
*
* The primary feature of this library is to provide a way to flush
* changes to persistent memory as outlined below (note that many
* ... | 21,858 | 21.817328 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem/pmem_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* Copyright (c) 2016, Microsoft Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* ... | 6,186 | 27.643519 | 74 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/auto_flush_windows.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2019, Intel Corporation */
#ifndef PMEM2_AUTO_FLUSH_WINDOWS_H
#define PMEM2_AUTO_FLUSH_WINDOWS_H 1
#define ACPI_SIGNATURE 0x41435049 /* hex value of ACPI signature */
#define NFIT_REV_SIGNATURE 0x5449464e /* hex value of htonl(NFIT) signature */
#define NFIT_... | 1,215 | 22.843137 | 78 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/deep_flush_linux.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* deep_flush_linux.c -- deep_flush functionality
*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include "deep_flush.h"
#include "libpmem2.h"
#include "map.h"
#include "os.h"
#include "out.h"
#inclu... | 2,395 | 20.392857 | 67 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/config.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* config.h -- internal definitions for pmem2_config
*/
#ifndef PMEM2_CONFIG_H
#define PMEM2_CONFIG_H
#include "libpmem2.h"
#define PMEM2_GRANULARITY_INVALID ((enum pmem2_granularity) (-1))
#define PMEM2_ADDRESS_ANY 0 /* defaul... | 1,070 | 28.75 | 75 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/map.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* map.h -- internal definitions for libpmem2
*/
#ifndef PMEM2_MAP_H
#define PMEM2_MAP_H
#include <stddef.h>
#include <stdbool.h>
#include "libpmem2.h"
#include "os.h"
#include "source.h"
#ifdef _WIN32
#include <windows.h>
#end... | 1,426 | 22.016129 | 67 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/deep_flush.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* deep_flush.h -- functions for deep flush functionality
*/
#ifndef PMEM2_DEEP_FLUSH_H
#define PMEM2_DEEP_FLUSH_H 1
#include "map.h"
#ifdef __cplusplus
extern "C" {
#endif
int pmem2_deep_flush_write(unsigned region_id);
int pmem2... | 644 | 22.035714 | 74 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/persist.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* persist.c -- pmem2_get_[persist|flush|drain]_fn
*/
#include <errno.h>
#include <stdlib.h>
#include "libpmem2.h"
#include "map.h"
#include "out.h"
#include "os.h"
#include "persist.h"
#include "deep_flush.h"
#include "pmem2_a... | 13,665 | 21.58843 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/persist_posix.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* persist_posix.c -- POSIX-specific part of persist implementation
*/
#include <errno.h>
#include <stdint.h>
#include <sys/mman.h>
#include "out.h"
#include "persist.h"
#include "pmem2_utils.h"
#include "valgrind_internal.h"
... | 1,126 | 21.098039 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/pmem2_utils_linux.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include "libpmem2.h"
#include "out.h"
#include "pmem2_utils.h"
#include "region_names... | 1,507 | 20.239437 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/source_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* source_windows.c -- windows specific pmem2_source implementation
*/
#include <Windows.h>
#include "config.h"
#include "libpmem2.h"
#include "config.h"
#include "out.h"
#include "pmem2_utils.h"
#include "source.h"
#include "ut... | 3,248 | 20.235294 | 76 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/pmem2_utils_none.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
#include <errno.h>
#include "libpmem2.h"
#include "out.h"
#include "pmem2_utils.h"
#include "source.h"
/*
* pmem2_device_dax_alignment -- checks the alignment of a given
* dax device from given source
*/
int
pmem2_device_dax_alignmen... | 727 | 20.411765 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/auto_flush_linux.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* auto_flush_linux.c -- Linux auto flush detection
*/
#define _GNU_SOURCE
#include <inttypes.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include "out.h"
#include "os.h"
#include "fs.h"
#... | 4,214 | 21.783784 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/config.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* config.c -- pmem2_config implementation
*/
#include <unistd.h>
#include "alloc.h"
#include "config.h"
#include "libpmem2.h"
#include "out.h"
#include "pmem2.h"
#include "pmem2_utils.h"
/*
* pmem2_config_init -- initialize c... | 5,603 | 20.227273 | 89 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/ravl_interval.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ravl_interval.h -- internal definitions for ravl_interval
*/
#ifndef RAVL_INTERVAL_H
#define RAVL_INTERVAL_H
#include "libpmem2.h"
#include "os_thread.h"
#include "ravl.h"
struct ravl_interval;
struct ravl_interval_node;
typede... | 947 | 27.727273 | 77 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/memops_generic.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* memops_generic.c -- architecture-independent memmove & memset fallback
*
* This fallback is needed to fulfill guarantee that pmem_mem[cpy|set|move]
* will use at least 8-byte stores (for 8-byte aligned buffers and sizes),
*... | 9,345 | 26.488235 | 78 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/pmem2_arch.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
/*
* pmem2_arch.h -- core-arch interface
*/
#ifndef PMEM2_ARCH_H
#define PMEM2_ARCH_H
#include <stddef.h>
#include "libpmem2.h"
#include "util.h"
#include "valgrind_internal.h"
#ifdef __cplusplus
extern "C" {
#endif
struct pmem2... | 1,427 | 22.8 | 79 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/region_namespace_ndctl.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* region_namespace_ndctl.c -- common ndctl functions
*/
#include <ndctl/libndctl.h>
#include <ndctl/libdaxctl.h>
#include <sys/sysmacros.h>
#include <fcntl.h>
#include "libpmem2.h"
#include "pmem2_utils.h"
#include "region_namespa... | 5,467 | 20.111969 | 72 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/pmem2_utils_other.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
#include <errno.h>
#include <sys/stat.h>
#include "libpmem2.h"
#include "out.h"
#include "pmem2_utils.h"
#ifdef _WIN32
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
int
pmem2_... | 1,301 | 20.7 | 77 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/deep_flush.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* deep_flush.c -- pmem2_deep_flush implementation
*/
#include <stdlib.h>
#include "libpmem2.h"
#include "deep_flush.h"
#include "out.h"
/*
* pmem2_deep_flush -- performs deep flush operation
*/
int
pmem2_deep_flush(struct pmem2_... | 929 | 21.682927 | 64 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/map_posix.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* map_posix.c -- pmem2_map (POSIX)
*/
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <sys/mman.h>
#include "libpmem2.h"
#include "alloc.h"
#include "auto_flush.h"
#include "config.h"
#include "file.h"
#i... | 13,869 | 25.879845 | 96 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/auto_flush_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2019, Intel Corporation */
/*
* auto_flush_windows.c -- Windows auto flush detection
*/
#include <windows.h>
#include <inttypes.h>
#include "alloc.h"
#include "out.h"
#include "os.h"
#include "endian.h"
#include "auto_flush_windows.h"
/*
* is_nfit_availa... | 4,857 | 23.535354 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/badblocks_ndctl.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2020, Intel Corporation */
/*
* badblocks_ndctl.c -- implementation of DIMMs API based on the ndctl library
*/
#define _GNU_SOURCE
#include <sys/types.h>
#include <libgen.h>
#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#inc... | 19,316 | 24.218016 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/region_namespace_ndctl.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2020, Intel Corporation */
/*
* region_namespace_ndctl.h -- internal definitions for libpmem2
* common ndctl functions
*/
#ifndef PMDK_REGION_NAMESPACE_NDCTL_H
#define PMDK_REGION_NAMESPACE_NDCTL_H 1
#include "os.h"
#ifdef __c... | 754 | 21.878788 | 64 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/vm_reservation.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* vm_reservation.c -- implementation of virtual memory allocation API
*/
#include "libpmem2.h"
/*
* pmem2_vm_reservation_new -- creates new virtual memory reservation
*/
int
pmem2_vm_reservation_new(struct pmem2_vm_reservation **... | 614 | 20.206897 | 70 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/usc_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* usc_windows.c -- pmem2 usc function for windows
*/
#include "alloc.h"
#include "source.h"
#include "out.h"
#include "libpmem2.h"
#include "pmem2_utils.h"
#define GUID_SIZE sizeof("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
#define VOL... | 5,261 | 22.283186 | 93 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/ravl_interval.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ravl_interval.c -- ravl_interval implementation
*/
#include "alloc.h"
#include "map.h"
#include "ravl_interval.h"
#include "pmem2_utils.h"
#include "sys_util.h"
#include "os_thread.h"
#include "ravl.h"
/*
* ravl_interval - struc... | 4,963 | 21.26009 | 80 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/map_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* map_windows.c -- pmem2_map (Windows)
*/
#include <stdbool.h>
#include "libpmem2.h"
#include "alloc.h"
#include "auto_flush.h"
#include "config.h"
#include "map.h"
#include "out.h"
#include "persist.h"
#include "pmem2_utils.... | 8,611 | 23.123249 | 99 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/extent_linux.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* extent_linux.c - implementation of the linux fs extent query API
*/
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <linux/fiemap.h>
#include "libpmem2.h"
#include "pmem2_utils.h"... | 3,519 | 20.333333 | 73 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/x86_64/flush.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
#ifndef X86_64_FLUSH_H
#define X86_64_FLUSH_H
#include <emmintrin.h>
#include <stddef.h>
#include <stdint.h>
#include "util.h"
#include "valgrind_internal.h"
#define FLUSH_ALIGN ((uintptr_t)64)
static force_inline void
pmem_clflus... | 2,521 | 20.193277 | 66 | h |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/x86_64/init.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
#include <string.h>
#include <xmmintrin.h>
#include "auto_flush.h"
#include "cpu.h"
#include "flush.h"
#include "memcpy_memset.h"
#include "os.h"
#include "out.h"
#include "pmem2_arch.h"
#include "valgrind_internal.h"
#define MOVNT... | 13,899 | 25.275992 | 79 | c |
null | NearPMSW-main/nearpm/shadow/pmdk-sd/src/libpmem2/x86_64/avx.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2018, Intel Corporation */
#ifndef PMEM_AVX_H
#define PMEM_AVX_H
#include <immintrin.h>
#include "util.h"
/*
* avx_zeroupper -- _mm256_zeroupper wrapper
*
* _mm256_zeroupper clears upper parts of avx registers.
*
* It's needed for 2 reasons:
* - it imp... | 2,238 | 24.735632 | 72 | h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.