plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
dscr_inherit_exec_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
2,691
utf_8
389ae907d5aed32a4d28b82cc47f8492
/* * POWER Data Stream Control Register (DSCR) fork exec test * * This testcase modifies the DSCR using mtspr, forks & execs and * verifies that the child is using the changed DSCR using mfspr. * * When using the privilege state SPR, the instructions such as * mfspr or mtspr are priviledged and the kernel emulat...
google
android
dscr_default_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_default_test.c
2,730
utf_8
1196365ffc0a6aa3160787d1907e809b
/* * POWER Data Stream Control Register (DSCR) default test * * This test modifies the system wide default DSCR through * it's sysfs interface and then verifies that all threads * see the correct changed DSCR value immediately. * */ #include "dscr.h" static unsigned long dscr; /* System DSCR default */ static u...
google
android
dscr_user_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_user_test.c
1,503
utf_8
3284ed9295bbd45b92104a12255fdd55
/* * POWER Data Stream Control Register (DSCR) SPR test * * This test modifies the DSCR value through both the SPR number * based mtspr instruction and then makes sure that the same is * reflected through mfspr instruction using either of the SPR * numbers. * * When using the privilege state SPR, the instructio...
google
android
dscr_sysfs_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
2,021
utf_8
606a528cdfcc0ff44198533cb99dff9a
/* * POWER Data Stream Control Register (DSCR) sysfs interface test * * This test updates to system wide DSCR default through the sysfs interface * and then verifies that all the CPU specific DSCR defaults are updated as * well verified from their sysfs interfaces. * */ #include "dscr.h" static int check_cpu_dsc...
google
android
dscr_explicit_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_explicit_test.c
1,751
utf_8
8880e0a7018b5f65c2b5062235796c7f
/* * POWER Data Stream Control Register (DSCR) explicit test * * This test modifies the DSCR value using mtspr instruction and * verifies the change with mfspr instruction. It uses both the * privilege state SPR and the problem state SPR for this purpose. * * When using the privilege state SPR, the instructions ...
google
android
dscr_sysfs_thread_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/dscr/dscr_sysfs_thread_test.c
1,804
utf_8
af537eab89ac86b1ea6e34b9682adcff
/* * POWER Data Stream Control Register (DSCR) sysfs thread test * * This test updates the system wide DSCR default value through * sysfs interface which should then update all the CPU specific * DSCR default values which must also be then visible to threads * executing on individual CPUs on the system. * */ #d...
google
android
tm-syscall
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/tm/tm-syscall.c
2,961
utf_8
d4682a1d77a1258a73c93ec911598aa9
/* * * Test the kernel's system call code to ensure that a system call * made from within an active HTM transaction is aborted with the * correct failure code. * Conversely, ensure that a system call made from within a * suspended transaction can succeed. */ #include <stdio.h> #include <unistd.h> #include <sys/s...
google
android
tm-resched-dscr
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
2,286
utf_8
f4f010c4113fa07a300a4cea2d41fa29
/* Test context switching to see if the DSCR SPR is correctly preserved * when within a transaction. * * Note: We assume that the DSCR has been left at the default value (0) * for all CPUs. * * Method: * * Set a value into the DSCR. * * Start a transaction, and suspend it (*). * * Hard loop checking to see ...
google
android
subpage_prot
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/mm/subpage_prot.c
4,486
utf_8
e9958942fefbff0fc5a074b59fdf8f41
/* * */ #include <assert.h> #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <sys/ptrace.h> #include <sys/syscall.h> #include <ucontext.h> #include <unistd.h> #include "utils.h" char *file_name; int ...
google
android
hugetlb_vs_thp_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c
1,727
utf_8
03cae5159a591790eb250dc78fa01e4b
#include <stdio.h> #include <sys/mman.h> #include <unistd.h> #include "utils.h" /* This must match the huge page & THP size */ #define SIZE (16 * 1024 * 1024) static int test_body(void) { void *addr; char *p; addr = (void *)0xa0000000; p = mmap(addr, SIZE, PROT_READ | PROT_WRITE, MAP_HUGETLB | MAP_ANONYMOUS | MA...
google
android
gettimeofday
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
519
utf_8
8b06183a4bf3cd621de2e641268d3e31
/* */ #include <sys/time.h> #include <stdio.h> #include "utils.h" static int test_gettimeofday(void) { int i; struct timeval tv_start, tv_end; gettimeofday(&tv_start, NULL); for(i = 0; i < 100000000; i++) { gettimeofday(&tv_end, NULL); } printf("time = %.6f\n", tv_end.tv_sec - tv_start.tv_sec + (tv_end.tv_usec...
google
android
load_unaligned_zeropad
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c
3,412
utf_8
405e1c2b9d720131efd2bf2b5ed014ec
/* * Userspace test harness for load_unaligned_zeropad. Creates two * pages and uses mprotect to prevent access to the second page and * a SEGV handler that walks the exception tables and runs the fixup * routine. * * The results are compared against a normal load that is that is * performed while access to the ...
google
android
validate
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/copyloops/validate.c
2,169
utf_8
025774c34cec28bee71c80456a4a9d62
#include <malloc.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include "../utils.h" #define MAX_LEN 8192 #define MAX_OFFSET 16 #define MIN_REDZONE 128 #define BUFLEN (MAX_LEN+MAX_OFFSET+2*MIN_REDZONE) #define POISON 0xa5 unsigned long COPY_LOOP(void *to, const void *from, unsigned long size); sta...
google
android
memcmp
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/stringloops/memcmp.c
1,837
utf_8
31de2cade7c82edf5e2ee70f8b775c32
#include <malloc.h> #include <stdlib.h> #include <string.h> #include "../utils.h" #define SIZE 256 #define ITERATIONS 10000 int test_memcmp(const void *s1, const void *s2, size_t n); /* test all offsets and lengths */ static void test_one(char *s1, char *s2) { unsigned long offset, size; for (offset = 0; offset <...
google
android
ipc_unmuxed
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/powerpc/syscalls/ipc_unmuxed.c
1,389
utf_8
854c804493abc8a7aa14dd72bf65c4cd
/* * * This test simply tests that certain syscalls are implemented. It doesn't * actually exercise their logic in any way. */ #define _GNU_SOURCE #include <errno.h> #include <stdio.h> #include <unistd.h> #include <sys/syscall.h> #include "utils.h" #define DO_TEST(_name, _num) \ static int test_##_name(void) \ { ...
google
android
get_size
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/size/get_size.c
2,453
utf_8
764e5956bc8cf02f6456997a179b7fd8
/* * * Selftest for runtime system size * * Prints the amount of RAM that the currently running system is using. * * This program tries to be as small as possible itself, to * avoid perturbing the system memory utilization with its * own execution. It also attempts to have as few dependencies * on kernel feat...
google
android
thuge-gen
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/thuge-gen.c
5,945
utf_8
25c25ee2f9f2594de2e20f1014399142
/* Test selecting other page sizes for mmap/shmget. Before running this huge pages for each huge page size must have been reserved. For large pages beyond MAX_ORDER (like 1GB on x86) boot options must be used. Also shmmax must be increased. And you need to run as root to work around some weird permissio...
google
android
compaction_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/compaction_test.c
5,142
utf_8
6aa8b5aedaf77427c4c0d27e657fceda
/* * * A test for the patch "Allow compaction of unevictable pages". * With this patch we should be able to allocate at least 1/4 * of RAM in huge pages. Without the patch much less is * allocated. */ #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <sys/resource.h> #include <fcntl.h> #includ...
google
android
mlock2-tests
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/mlock2-tests.c
15,190
utf_8
137ba2c438004a5043d62530f51287d9
#define _GNU_SOURCE #include <sys/mman.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <sys/resource.h> #include <syscall.h> #include <errno.h> #include <stdbool.h> #ifndef MLOCK_ONFAULT #define MLOCK_ONFAULT 1 #endif #ifndef MCL_ONF...
google
android
on-fault-limit
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/on-fault-limit.c
819
utf_8
cb5bf146eab2875670d976e78e29bd35
#include <sys/mman.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <sys/resource.h> #ifndef MCL_ONFAULT #define MCL_ONFAULT (MCL_FUTURE << 1) #endif static int test_limit(void) { int ret = 1; struct rlimit lims; void *map; perror("getrlimit"); return ret; } if (mloc...
google
android
transhuge-stress
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/transhuge-stress.c
3,551
utf_8
74afb8fd1bdc7926f2695ec534552ba5
/* * Stress test for transparent huge pages, memory compaction and migration. * */ #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <err.h> #include <time.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <sys/mman.h> #define PAGE_SHIFT 12 #define HPAGE_SHIFT 21 #define PAGE_S...
google
android
hugepage-mmap
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/hugepage-mmap.c
2,091
utf_8
25aa70099da04cfeeee5698f2b131d42
/* * hugepage-mmap: * * Example of using huge page memory in a user application using the mmap * system call. Before running this application, make sure that the * administrator has mounted the hugetlbfs filesystem (on some directory * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this * exampl...
google
android
hugepage-shm
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/hugepage-shm.c
2,544
utf_8
79ff6558d4af6dc86825cc7b623f184f
/* * hugepage-shm: * * Example of using huge page memory in a user application using Sys V shared * memory system calls. In this example the app is requesting 256MB of * memory that is backed by huge pages. The application uses the flag * SHM_HUGETLB in the shmget system call to inform the kernel that it is * ...
google
android
userfaultfd
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/userfaultfd.c
17,529
utf_8
d71074f97bd17763f97d25e4c57ad86f
/* * Stress userfaultfd syscall. * * * This test allocates two virtual areas and bounces the physical * memory across the two virtual areas (from area_src to area_dst) * using userfaultfd. * * There are three threads running per CPU: * * 1) one per-CPU thread takes a per-page pthread_mutex in a random * p...
google
android
map_hugetlb
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/vm/map_hugetlb.c
1,840
utf_8
47aaf34c9850edce1307e5f1c5aa23bd
/* * Example of using hugepage memory in a user application using the mmap * system call with MAP_HUGETLB flag. Before running this program make * sure the administrator has allocated enough default sized huge pages * to cover the 256 MB allocation. * * For ia64 architecture, Linux kernel reserves Region number ...
google
android
peeksiginfo
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/ptrace/peeksiginfo.c
4,716
utf_8
026bc9716a64e6fe381bf5c6f754df56
#define _GNU_SOURCE #include <stdio.h> #include <signal.h> #include <unistd.h> #include <errno.h> #include <linux/types.h> #include <sys/wait.h> #include <sys/syscall.h> #include <sys/user.h> #include <sys/mman.h> #include "linux/ptrace.h" static int sys_rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo) { retur...
google
android
mq_open_tests
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/mqueue/mq_open_tests.c
15,817
utf_8
32029f53cfed4828c37f96eef54f818c
/* * * mq_open_tests.c * Tests the various situations that should either succeed or fail to * open a posix message queue and then reports whether or not they * did as they were supposed to. * */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <limi...
google
android
mq_perf_tests
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/mqueue/mq_perf_tests.c
21,907
utf_8
545fc1553394e7c97375aff60c0cb9b8
/* * * mq_perf_tests.c * Tests various types of message queue workloads, concentrating on those * situations that invole large message sizes, large message queue depths, * or both, and reports back useful metrics about kernel message queue * performance. * */ #define _GNU_SOURCE #include <stdio.h> #incl...
google
android
single_step_syscall
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/single_step_syscall.c
4,899
utf_8
4572069685b2146636169fc8e323198d
/* * single_step_syscall.c - single-steps various x86 syscalls * * This is a very simple series of tests that makes system calls with * the TF flag set. This exercises some nasty kernel code in the * SYSENTER case: SYSENTER does not clear TF, so SYSENTER with TF set * immediately issues #DB from CPL 0. This req...
google
android
sysret_ss_attrs
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/sysret_ss_attrs.c
2,924
utf_8
22d581bfdbbbd31e1f64fdaa01bfe66c
/* * sysret_ss_attrs.c - test that syscalls return valid hidden SS attributes * * On AMD CPUs, SYSRET can return with a valid SS descriptor with with * the hidden attributes set to an unusable state. Make sure the kernel * doesn't let this happen. */ #define _GNU_SOURCE #include <stdlib.h> #include <unistd.h> #i...
google
android
test_FISTTP
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/test_FISTTP.c
3,084
utf_8
32ed91a601a52ec50c9f66baddc70e00
#undef _GNU_SOURCE #define _GNU_SOURCE 1 #undef __USE_GNU #define __USE_GNU 1 #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <signal.h> #include <sys/types.h> #include <sys/select.h> #include <sys/time.h> #include <sys/wait.h> #include <fenv.h> unsigned long long res64 = -1; un...
google
android
test_syscall_vdso
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/test_syscall_vdso.c
9,573
utf_8
a7d01b8629f6f4e0cb1b092bbbff1c07
/* * 32-bit syscall ABI conformance test. * */ /* * Can be built statically: * gcc -Os -Wall -static -m32 test_syscall_vdso.c thunks_32.S */ #undef _GNU_SOURCE #define _GNU_SOURCE 1 #undef __USE_GNU #define __USE_GNU 1 #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <signal...
google
android
test_FCOMI
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/test_FCOMI.c
7,355
utf_8
5cc0511f9e9711e99346ff89cbef53d8
#undef _GNU_SOURCE #define _GNU_SOURCE 1 #undef __USE_GNU #define __USE_GNU 1 #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <signal.h> #include <sys/types.h> #include <sys/select.h> #include <sys/time.h> #include <sys/wait.h> #include <fenv.h> enum { CF = 1 << 0, PF = 1 << 2...
google
android
unwind_vdso
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/unwind_vdso.c
5,157
utf_8
907094f7ba7e2be1f83f578025c48f9d
/* * unwind_vdso.c - tests unwind info for AT_SYSINFO in the vDSO * * This tests __kernel_vsyscall's unwind info. */ #define _GNU_SOURCE #include <features.h> #include <stdio.h> #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 16 int main() { /* We need getauxval(). */ printf("[SKIP]\tGLIBC before 2....
google
android
entry_from_vm86
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/entry_from_vm86.c
6,081
utf_8
cd4b09c907daf50a153c76293fdcc269
/* * entry_from_vm86.c - tests kernel entries from vm86 mode */ #define _GNU_SOURCE #include <assert.h> #include <stdlib.h> #include <sys/syscall.h> #include <sys/signal.h> #include <sys/ucontext.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <inttypes.h> #include <sys/mman.h> #include <err.h>...
google
android
sigreturn
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/sigreturn.c
19,282
utf_8
943463a779edc22a5d56c4a0127c81ab
/* * sigreturn.c - tests for x86 sigreturn(2) and exit-to-userspace * * This is a series of tests that exercises the sigreturn(2) syscall and * the IRET / SYSRET paths in the kernel. * * For now, this focuses on the effects of unusual CS and SS values, * and it has a bunch of tests to make sure that ESP/RSP is r...
google
android
syscall_nt
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/syscall_nt.c
1,449
utf_8
dc11c486f3a1145375126f51306719ce
/* * syscall_nt.c - checks syscalls with NT set * * Some obscure user-space code requires the ability to make system calls * with FLAGS.NT set. Make sure it works. */ #include <stdio.h> #include <unistd.h> #include <sys/syscall.h> #include <asm/processor-flags.h> #ifdef __x86_64__ # define WIDTH "q" #else # defin...
google
android
trivial_32bit_program
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/trivial_32bit_program.c
245
utf_8
8b632b6ebf593af3e6603c23fe730889
/* * Trivial program to check that we have a valid 32-bit build environment. */ #ifndef __i386__ # error wrong architecture #endif #include <stdio.h> int main() { printf("\n"); return 0; }
google
android
test_FCMOV
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/test_FCMOV.c
2,368
utf_8
e68be86b8e23dad84bb2bf38613ee676
#undef _GNU_SOURCE #define _GNU_SOURCE 1 #undef __USE_GNU #define __USE_GNU 1 #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <signal.h> #include <sys/types.h> #include <sys/select.h> #include <sys/time.h> #include <sys/wait.h> #define TEST(insn) \ long double __attribute__((noi...
google
android
ldt_gdt
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/ldt_gdt.c
14,145
utf_8
b8b03203ba1919365dea43a327f4df2c
/* * ldt_gdt.c - Test cases for LDT and GDT access */ #define _GNU_SOURCE #include <err.h> #include <stdio.h> #include <stdint.h> #include <signal.h> #include <setjmp.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <sys/syscall.h> #include <asm/ldt.h> #include <sys/types.h> ...
google
android
syscall_arg_fault
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/syscall_arg_fault.c
3,580
utf_8
3284e806edc8eec93e18131a6f44694b
/* * syscall_arg_fault.c - tests faults 32-bit fast syscall stack args */ #define _GNU_SOURCE #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/signal.h> #include <sys/ucontext.h> #include <err.h> #include <setjmp.h> #include <errno.h> /* Our sigaltstack scratch space. */ static unsigned char a...
google
android
ptrace_syscall
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/ptrace_syscall.c
8,092
utf_8
9a42b98e5cce25d5abe5b81c93b940b1
#define _GNU_SOURCE #include <sys/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/syscall.h> #include <sys/user.h> #include <unistd.h> #include <errno.h> #include <stddef.h> #include <stdio.h> #include <err.h> #include <string.h> #include <asm/ptrace-abi.h> #include <sys/auxv.h> /* Bitness-agnost...
google
android
trivial_64bit_program
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/x86/trivial_64bit_program.c
247
utf_8
80b71d72c9c16d43a65c11f86b4af0b7
/* * Trivial program to check that we have a valid 64-bit build environment. */ #ifndef __x86_64__ # error wrong architecture #endif #include <stdio.h> int main() { printf("\n"); return 0; }
google
android
unprivileged-remount-test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/mount/unprivileged-remount-test.c
8,379
utf_8
ddc6285b3813426d1c59c9463c202c1c
#define _GNU_SOURCE #include <sched.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/mount.h> #include <sys/wait.h> #include <sys/vfs.h> #include <sys/statvfs.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <grp.h> #include <stdbool.h> #include <st...
google
android
breakpoint_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/breakpoints/breakpoint_test.c
7,409
utf_8
afe37d3c4d0a591ffcc032104527bfcf
/* * * Selftests for breakpoints (and more generally the do_debug() path) in x86. */ #include <sys/ptrace.h> #include <unistd.h> #include <stddef.h> #include <sys/user.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <sys/types.h> #include <sys/wait.h> #include "../kselftest.h" /* Breakpoint ac...
google
android
membarrier_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/membarrier/membarrier_test.c
2,702
utf_8
7660d02cd8f5cd2a8dd35556f8c70edd
#define _GNU_SOURCE #include <linux/membarrier.h> #include <syscall.h> #include <stdio.h> #include <errno.h> #include <string.h> #include "../kselftest.h" enum test_membarrier_status { TEST_MEMBARRIER_PASS = 0, TEST_MEMBARRIER_FAIL, TEST_MEMBARRIER_SKIP, }; static int sys_membarrier(int cmd, int flags) { return ...
google
android
psock_tpacket
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/net/psock_tpacket.c
18,158
utf_8
43a91b4bd7e93770f9681943d25ad754
/* * * A basic test of packet socket's TPACKET_V1/TPACKET_V2/TPACKET_V3 behavior. * * Control: * Test the setup of the TPACKET socket with different patterns that are * known to fail (TODO) resp. succeed (OK). * * Datapath: * Open a pair of packet sockets and send resp. receive an a priori known * pac...
google
android
psock_fanout
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/net/psock_fanout.c
10,418
utf_8
701796a478f2d4f69dfd8086042b7113
/* * * A basic test of packet socket fanout behavior. * * Control: * - create fanout fails as expected with illegal flag combinations * - join fanout fails as expected with diverging types or flags * * Datapath: * Open a pair of packet sockets and a pair of INET sockets, send a known * number of packets...
google
android
socket
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/net/socket.c
1,914
utf_8
633e657ee1193c88494af86227ccebf0
#include <stdio.h> #include <errno.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> struct socket_testcase { int domain; int type; int protocol; /* 0 = valid file descriptor * -foo = error foo */ int expect; /* If non-zero, accept EAFNOSUP...
google
android
kcmp_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/kcmp/kcmp_test.c
2,361
utf_8
03b1a5849f08bcb40172d5174b9349ad
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <limits.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <fcntl.h> #include <linux/unistd.h> #include <linux/kcmp.h> #include <sys/syscall.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h...
google
android
nsleep-lat
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/nsleep-lat.c
4,501
utf_8
9d7155dba27ce135fedb5c428d24048d
/* Measure nanosleep timer latency */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { ...
google
android
mqueue-lat
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/mqueue-lat.c
2,757
utf_8
ef7c46155b3a720ad5cf3d8b4e2941e0
/* Measure mqueue timeout latency */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #include <errno.h> #include <mqueue.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } sta...
google
android
set-timer-lat
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/set-timer-lat.c
5,089
utf_8
b082058f01a5ab709d0d7889e68887f0
/* set_timer latency test */ #include <stdio.h> #include <unistd.h> #include <time.h> #include <string.h> #include <signal.h> #include <stdlib.h> #include <pthread.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } #...
google
android
leapcrash
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/leapcrash.c
2,405
utf_8
64bedd7ca2109089db333a8f1327c5c2
/* Demo leapsecond deadlock * * This test demonstrates leapsecond deadlock that is possibe * on kernels from 2.6.26 to 3.3. * * WARNING: THIS WILL LIKELY HARDHANG SYSTEMS AND MAY LOSE DATA * RUN AT YOUR OWN RISK! * To build: * $ gcc leapcrash.c -o leapcrash -lrt */ #include <stdio.h> #include <stdlib.h> #incl...
google
android
set-tai
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/set-tai.c
1,642
utf_8
d9bd1f068714b5232ac02474520eb8b8
/* Set tai offset */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #include <unistd.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void)...
google
android
leap-a-day
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/leap-a-day.c
9,182
utf_8
b586aa18e569127882ab02f429c92c77
/* Leap second stress test * * This test signals the kernel to insert a leap second * every day at midnight GMT. This allows for stessing the * kernel's leap-second behavior, as well as how well applications * handle the leap-second discontinuity. * * Usage: leap-a-day [-s] [-i <num>] * * Options: * -s:...
google
android
threadtest
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/threadtest.c
4,481
utf_8
d87dd7b7891800432096da1d898daeec
/* threadtest.c */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/time.h> #include <pthread.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } #endif /* serializes shared list access */ pthr...
google
android
inconsistency-check
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/inconsistency-check.c
4,962
utf_8
8e9d62f7330e5a3aa8ae04dfa3fd14cb
/* Time inconsistency check test */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_...
google
android
change_skew
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/change_skew.c
2,269
utf_8
eb27b6904b6a75342b7467c986965597
/* ADJ_FREQ Skew change test */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <sys/timex.h> #include <time.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } #endif #define NSEC_PER_SEC 100000...
google
android
set-2038
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/set-2038.c
3,057
utf_8
847e9e7d487e732f527f740a2fb830e7
/* Time bounds setting test */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <sys/time.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } #endif #define NSEC_PER_SEC 1000000000...
google
android
skew_consistency
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/skew_consistency.c
2,003
utf_8
d37a465a113e7cea734729dfc15d0010
/* ADJ_FREQ Skew consistency test */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/time.h> #include <sys/timex.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #ifdef KTEST #include "../kselftes...
google
android
clocksource-switch
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/clocksource-switch.c
3,620
utf_8
5bca684d77d4ab8469880179dc6e0370
/* Clocksource change test */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/time.h> #include <sys/timex.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <sys/wait.h> #ifdef KTEST #include "../kselftest.h" #else static inline in...
google
android
posix_timers
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/posix_timers.c
4,454
utf_8
aab4122bac1e29ca2726a108a3b2ca85
/* */ #include <sys/time.h> #include <stdio.h> #include <signal.h> #include <unistd.h> #include <time.h> #include <pthread.h> #include "../kselftest.h" #define DELAY 2 #define USECS_PER_SEC 1000000 static volatile int done; /* Busy loop in userspace to elapse ITIMER_VIRTUAL */ static void user_loop(void) { while (!do...
google
android
rtctest
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/rtctest.c
6,162
utf_8
e6a8370c9f33c858b3e39a6450fc6f1a
/* * Real Time Clock Driver Test/Example Program * * Compile with: * gcc -s -Wall -Wstrict-prototypes rtctest.c -o rtctest * * included herein by reference. * */ #include <stdio.h> #include <linux/rtc.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/types.h> #include <fcntl.h> ...
google
android
valid-adjtimex
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/valid-adjtimex.c
3,847
utf_8
a9a735cea3176633b79323118617b6a5
/* valid adjtimex test */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #include <unistd.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(...
google
android
nanosleep
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/nanosleep.c
4,166
utf_8
d4a9ca3611cba2f400db02b88d9fef33
/* Make sure timers don't return early */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <sys/timex.h> #include <string.h> #include <signal.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ...
google
android
alarmtimer-suspend
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/alarmtimer-suspend.c
4,530
utf_8
f3e2e3ab1e6972d7bb8dcf9dddff95a7
/* alarmtimer suspend test */ #include <stdio.h> #include <unistd.h> #include <time.h> #include <string.h> #include <signal.h> #include <stdlib.h> #include <pthread.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } ...
google
android
raw_skew
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/raw_skew.c
3,571
utf_8
208fdb60a72a9632afecbe7d55cfb590
/* CLOCK_MONOTONIC vs CLOCK_MONOTONIC_RAW skew test */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/time.h> #include <sys/timex.h> #include <time.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { ex...
google
android
adjtick
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/timers/adjtick.c
4,777
utf_8
bf875077b42a416d51c1eda5addd14b0
/* adjtimex() tick adjustment test */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/time.h> #include <sys/timex.h> #include <time.h> #ifdef KTEST #include "../kselftest.h" #else static inline int ksft_exit_pass(void) { exit(0); } static inline int ksft_exit_fail(void) { exit(1); } #endif #...
google
android
futex_requeue_pi_mismatched_ops
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_requeue_pi_mismatched_ops.c
3,311
utf_8
1ad423d859d90163b2f2f3441341f6c1
/****************************************************************************** * * *****************************************************************************/ #include <errno.h> #include <getopt.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "futexte...
google
android
futex_requeue_pi
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_requeue_pi.c
10,456
utf_8
3b6236e4c6001d480ad0d28ae18566c6
/****************************************************************************** * * *****************************************************************************/ #include <errno.h> #include <limits.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <string.h> #include "atomi...
google
android
futex_wait_uninitialized_heap
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c
2,738
utf_8
dce3aed24aebfce5c37d061a8ff7e6c7
/****************************************************************************** * * *****************************************************************************/ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <syscall.h> #include <sys/types.h> #include <sys/stat.h> #inclu...
google
android
futex_requeue_pi_signal_restart
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c
5,499
utf_8
d63ff987e54652fa6972012082567acd
/****************************************************************************** * * *****************************************************************************/ #include <errno.h> #include <getopt.h> #include <limits.h> #include <pthread.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <strin...
google
android
futex_wait_private_mapped_file
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c
2,904
utf_8
c4b9b09a87d6c5b891f12a0cef963877
/****************************************************************************** * * *****************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <syscall.h> #include <unistd.h> #include <errno.h> #include <linux/futex.h> #include <pthread.h> #include ...
google
android
futex_wait_timeout
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_wait_timeout.c
2,140
utf_8
582ca5693bab70debb383911f891928e
/****************************************************************************** * * *****************************************************************************/ #include <errno.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "futextest.h" #include "loggi...
google
android
futex_wait_wouldblock
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c
2,043
utf_8
e5db93a271c6a720c41e7f03ae976a5e
/****************************************************************************** * * *****************************************************************************/ #include <errno.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "futextest.h" #include "loggi...
google
android
seccomp_bpf
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/seccomp/seccomp_bpf.c
57,241
utf_8
fdfa147aa081d9263e159f96b4165d7a
/* * * Test code for seccomp bpf. */ #include <asm/siginfo.h> #define __have_siginfo_t 1 #define __have_sigval_t 1 #define __have_sigevent_t 1 #include <errno.h> #include <linux/filter.h> #include <sys/prctl.h> #include <sys/ptrace.h> #include <sys/types.h> #include <sys/user.h> #include <linux/prctl.h> #include <li...
google
android
execveat
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/exec/execveat.c
13,164
utf_8
14c60751df96a7aea1723fdad20cfaa6
/* * * Selftests for execveat(2). */ #define _GNU_SOURCE /* to get O_PATH, AT_EMPTY_PATH */ #include <sys/sendfile.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #include <sys/wait.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include ...
google
android
msgque
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/ipc/msgque.c
5,386
utf_8
80d5705fb34204ebc54399a9645a968f
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <linux/msg.h> #include <fcntl.h> #include "../kselftest.h" #define MAX_MSG_SIZE 32 struct msg1 { int msize; long mtype; char mtext[MAX_MSG_SIZE]; }; #define TEST_STRING "Test sysv5 msg" #define MSG_TYPE 1 #define ANOTHER_TES...
google
android
validate_cap
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/capabilities/validate_cap.c
1,723
utf_8
878b5bd311362a071082afc759bfd2f7
#include <cap-ng.h> #include <err.h> #include <linux/capability.h> #include <stdbool.h> #include <string.h> #include <stdio.h> #include <sys/prctl.h> #include <sys/auxv.h> #ifndef PR_CAP_AMBIENT #define PR_CAP_AMBIENT 47 # define PR_CAP_AMBIENT_IS_SET 1 # define PR_CAP_AMBIENT_RAISE 2 # define PR_CAP_AMBIENT_LOWER ...
google
android
test_execve
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/testing/selftests/capabilities/test_execve.c
11,176
utf_8
e3c36e7c3b86da6d7b7c786d4fa40aee
#define _GNU_SOURCE #include <cap-ng.h> #include <err.h> #include <linux/capability.h> #include <stdbool.h> #include <string.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <stdarg.h> #include <sched.h> #include <sys/mount.h> #include <limits.h> #include <libgen.h> #include <malloc.h> #include <sys...
google
android
bpf_asm
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/net/bpf_asm.c
1,226
utf_8
080677fc05972a14b3d5832356c15533
/* * Minimal BPF assembler * * Instead of libpcap high-level filter expressions, it can be quite * useful to define filters in low-level BPF assembler (that is kept * close to Steven McCanne and Van Jacobson's original BPF paper). * In particular for BPF JIT implementors, JIT security auditors, or * just for def...
google
android
bpf_dbg
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/net/bpf_dbg.c
28,872
utf_8
bf74d5e3d16f409f913c4d7e34047fd4
/* * Minimal BPF debugger * * Minimal BPF debugger that mimics the kernel's engine (w/o extensions) * and allows for single stepping through selected packets from a pcap * with a provided user filter in order to facilitate verification of a * BPF program. Besides others, this is useful to verify BPF programs * b...
google
android
bpf_jit_disasm
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/net/bpf_jit_disasm.c
5,492
utf_8
deaad68ce2214964f8663a884da9c21c
/* * Minimal BPF JIT image disassembler * * Disassembles BPF JIT compiler emitted opcodes back to asm insn's for * debugging or verification purposes. * * To get the disassembly of the JIT code, do the following: * * 1) `echo 2 > /proc/sys/net/core/bpf_jit_enable` * 2) Load a BPF filter (e.g. `tcpdump -p -n ...
google
android
cgroup_event_listener
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/cgroup/cgroup_event_listener.c
1,822
utf_8
6e4f785a78f386fcdcb84b33f50a90d0
/* * cgroup_event_listener.c - Simple listener of cgroup events * */ #include <assert.h> #include <err.h> #include <errno.h> #include <fcntl.h> #include <libgen.h> #include <limits.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/eventfd.h> #define USAGE_STR "Usage: cgroup_event_listener <...
google
android
decode-fcp
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/firewire/decode-fcp.c
5,617
utf_8
67354cfe4aa922b3cfc3ebc921af4471
#include <linux/firewire-constants.h> #include <stdio.h> #include <stdlib.h> #include "list.h" #include "nosy-dump.h" #define CSR_FCP_COMMAND 0xfffff0000b00ull #define CSR_FCP_RESPONSE 0xfffff0000d00ull static const char * const ctype_names[] = { [0x0] = "control", [0x8] = "not implemented", [0x1] = "status", ...
google
android
nosy-dump
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/firewire/nosy-dump.c
25,737
iso_8859_1
ea98a1b8002420970285048016a24642
/* * nosy-dump - Interface to snoop mode driver for TI PCILynx 1394 controllers * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <byteswap.h> #include <endian.h> #include <fcntl.h> #include <linux/firewire-constants.h> #include <poll.h> #include <popt.h> #include <signal.h> #include <stdi...
google
android
virtio_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/virtio_test.c
6,877
utf_8
2799c4dc57295b6feceaac442a087ef1
#define _GNU_SOURCE #include <getopt.h> #include <string.h> #include <poll.h> #include <sys/eventfd.h> #include <stdlib.h> #include <assert.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <stdbool.h> #include <linux/virtio_types.h> #include <linux/v...
google
android
vringh_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/vringh_test.c
20,274
utf_8
8fc830c99ededcd851669e94cba18f65
/* Simple test of virtio code, entirely in userpsace. */ #define _GNU_SOURCE #include <sched.h> #include <err.h> #include <linux/kernel.h> #include <linux/err.h> #include <linux/virtio.h> #include <linux/vringh.h> #include <linux/virtio_ring.h> #include <linux/virtio_config.h> #include <linux/uaccess.h> #include <sys/t...
google
android
trace-agent-ctl
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/virtio-trace/trace-agent-ctl.c
2,676
utf_8
1d775fdaed436b89b198222d404fb4f4
/* * Controller of read/write threads for virtio-trace * * */ #define _GNU_SOURCE #include <fcntl.h> #include <poll.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "trace-agent.h" #define HOST_MSG_SIZE 256 #define EVENT_WAIT_MSEC 100 static volatile sig_atomic_t global_s...
google
android
trace-agent-rw
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/virtio-trace/trace-agent-rw.c
4,401
utf_8
1a2d74b6b06c50d9a2660211fe878a2b
/* * Read/write thread of a guest agent for virtio-trace * * */ #define _GNU_SOURCE #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/syscall.h> #include "trace-agent.h" #define READ_WAIT_USEC 100000 void *rw_thread_info_new(void) { struct rw_thread_info *rw_ti; rw_ti = z...
google
android
trace-agent
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/virtio-trace/trace-agent.c
5,238
utf_8
382e8101d80697e45fb82099aee34250
/* * Guest agent for virtio-trace * * */ #define _GNU_SOURCE #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "trace-agent.h" #define PAGE_SIZE (sysconf(_SC_PAGE_SIZE)) #define PIPE_DEF_BUFS 16 #define PIPE_MIN_SIZE (PAGE_SIZE*PIPE_DEF_BUFS) #define PIPE_MAX_SIZE (1024*102...
google
android
vhost_test
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/virtio/vhost_test/vhost_test.c
18
utf_8
db868860cf4da73eb6499489cc4e096a
#include "test.c"
google
android
lguest
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/lguest/lguest.c
97,319
utf_8
09392d9cecc0a2ce032ab5c00aca0b34
/*P:100 * This is the Launcher code, a simple program which lays out the "physical" * memory for the new Guest by mapping the kernel image and the virtual * devices, then opens /dev/lguest to tell the kernel about the Guest and * control it. :*/ #define _LARGEFILE64_SOURCE #define _GNU_SOURCE #include <stdio.h> #in...
google
android
fixdep
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/fixdep.c
3,718
utf_8
815dfa370a2eba5488bd5cbe1e384471
/* * "Optimize" a list of dependencies as spit out by gcc -MD * for the build framework. * * Original author: * * This code has been borrowed from kbuild's fixdep (scripts/basic/fixdep.c), * Please check it for detailed explanation. This fixdep borow only the * base transformation of dependecies without the CON...
google
android
b
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/tests/ex/b.c
28
utf_8
1af622903878ac62148be5fbe9cbb856
int b(void) { return 0; }
google
android
a
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/tests/ex/a.c
28
utf_8
6965460fd54cb3cf9c81d4ad2d68f7ae
int a(void) { return 0; }
google
android
inc
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/tests/ex/inc.c
71
utf_8
c7b90311d654c1f1a88e7560d281e2af
#ifdef INCLUDE #include "krava.h" #endif int inc(void) { return 0; }
google
android
ex
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/tests/ex/ex.c
170
utf_8
352c3ecae6861c1e644616cb023d03f0
int a(void); int b(void); int c(void); int d(void); int e(void); int f(void); int inc(void); int main(void) { a(); b(); c(); d(); e(); f(); inc(); return 0; }
google
android
d
.c
platform/hardware/bsp/kernel/intel/edison-v4.4/tools/build/tests/ex/d.c
28
utf_8
1648906790ba13f468734606aadfda4f
int d(void) { return 0; }