code stringlengths 6 250k | repo_name stringlengths 5 70 | path stringlengths 3 177 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 250k |
|---|---|---|---|---|---|
/*
* Copyright (C) 2010 Bluecherry, LLC www.bluecherrydvr.com
* Copyright (C) 2010 Ben Collins <bcollins@bluecherry.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 ... | nc543/linux-release | drivers/staging/solo6x10/solo6010-i2c.c | C | gpl-2.0 | 7,680 |
/* Linux/ia64 does not need unwind table registry. */
| SanDisk-Open-Source/SSD_Dashboard | uefi/userspace/glibc/ports/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c | C | gpl-2.0 | 54 |
/*
* Linux multi-function-device driver (MFD) for the integrated peripherals
* of the VIA VX855 chipset
*
* Copyright (C) 2009 VIA Technologies, Inc.
* Copyright (C) 2010 One Laptop per Child
* Author: Harald Welte <HaraldWelte@viatech.com>
* All rights reserved.
*
* This program is free software; you can redi... | moonlightly/kernel_htc_qsd8k | drivers/mfd/vx855.c | C | gpl-2.0 | 4,057 |
/*
* bootmem - A boot-time physical memory allocator and configurator
*
* Copyright (C) 1999 Ingo Molnar
* 1999 Kanoj Sarcar, SGI
* 2008 Johannes Weiner
*
* Access to this subsystem has to be serialized externally (which is true
* for the boot process anyway).
*/
#include <linux... | SanDisk-Open-Source/SSD_Dashboard | uefi/linux-source-3.8.0/mm/nobootmem.c | C | gpl-2.0 | 11,469 |
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <endian.h>
#include "event-parse.h"
/*
* From glibc endian.h, for older systems where it is not present, e.g.: RHEL5,
* Fedora6.
*/
#ifndef le16toh
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define le16toh(x) (x)
... | hannes/linux | tools/lib/traceevent/plugin_cfg80211.c | C | gpl-2.0 | 993 |
// SPDX-License-Identifier: GPL-2.0
// test ir decoder
//
// Copyright (C) 2018 Sean Young <sean@mess.org>
#include <linux/bpf.h>
#include <linux/lirc.h>
#include "bpf_helpers.h"
SEC("lirc_mode2")
int bpf_decoder(unsigned int *sample)
{
if (LIRC_IS_PULSE(*sample)) {
unsigned int duration = LIRC_VALUE(*sample);
... | qzhuyan/linux | tools/testing/selftests/bpf/test_lirc_mode2_kern.c | C | gpl-2.0 | 563 |
/*
* sigreturn.c - tests for x86 sigreturn(2) and exit-to-userspace
* Copyright (c) 2014-2015 Andrew Lutomirski
*
* This program is free software; you can redistribute it and/or modify
* it under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.... | codeaurora-unoffical/linux-msm | tools/testing/selftests/x86/sigreturn.c | C | gpl-2.0 | 23,945 |
/* Test the `vmulQu32' ARM Neon intrinsic. */
/* This file was autogenerated by neon-testgen. */
/* { dg-do assemble } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-options "-save-temps -O0" } */
/* { dg-add-options arm_neon } */
#include "arm_neon.h"
void test_vmulQu32 (void)
{
uint32x4_t out_uin... | SanDisk-Open-Source/SSD_Dashboard | uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.target/arm/neon/vmulQu32.c | C | gpl-2.0 | 636 |
/* -*- linux-c -*-
* drivers/char/viotape.c
*
* iSeries Virtual Tape
*
* Authors: Dave Boutcher <boutcher@us.ibm.com>
* Ryan Arnold <ryanarn@us.ibm.com>
* Colin Devilbiss <devilbis@us.ibm.com>
* Stephen Rothwell
*
* (C) Copyright 2000-2004 IBM Corporation
*
* This program is... | wkritzinger/asuswrt-merlin | release/src-rt-7.x.main/src/linux/linux-2.6.36/drivers/char/viotape.c | C | gpl-2.0 | 26,464 |
/*
* SCSI target kernel/user interface functions
*
* Copyright (C) 2005 FUJITA Tomonori <tomof@acm.org>
* Copyright (C) 2005 Mike Christie <michaelc@cs.wisc.edu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the ... | talnoah/android_kernel_htc_dlx | virt/drivers/scsi/scsi_tgt_if.c | C | gpl-2.0 | 9,294 |
/* Test for _Atomic in C11. Test of valid assignment cases for
arithmetic types. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#define TEST_ASSIGN(TYPE1, OP, TYPE2) \
do \
{ \
_Atomic TYPE1 a = 0; \
TYPE2 b = 0; \
_Atomic TYPE2 c = 0; \
... | selmentdev/selment-toolchain | source/gcc-latest/gcc/testsuite/gcc.dg/c11-atomic-2.c | C | gpl-3.0 | 4,207 |
/*
* Copyright © 2007 David Airlie
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish,... | kv193/buildroot | linux/linux-kernel/drivers/gpu/drm/nouveau/nouveau_fbcon.c | C | gpl-2.0 | 14,178 |
/*
* volume_id - reads filesystem label and uuid
*
* Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 o... | cyclops8456/vyatta-busybox | util-linux/volume_id/unused_lsi_raid.c | C | gpl-2.0 | 1,552 |
/* $Header: /cvsroot/osrs/libtiff/libtiff/tif_open.c,v 1.6 2001/07/20 02:22:46 warmerda Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby gran... | xbmc/atv2 | xbmc/lib/cximage-6.0/tiff/tif_open.c | C | gpl-2.0 | 13,384 |
/*
* nvec_paz00: OEM specific driver for Compal PAZ00 based devices
*
* Copyright (C) 2011 The AC100 Kernel Team <ac100@lists.launchpad.net>
*
* Authors: Ilya Petrov <ilya.muromec@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the... | geminy/aidear | oss/linux/linux-4.7/drivers/staging/nvec/nvec_paz00.c | C | gpl-3.0 | 2,048 |
/*
* ams369fg06 AMOLED LCD panel driver.
*
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
* Author: Jingoo Han <jg1.han@samsung.com>
*
* Derived from drivers/video/s6e63m0.c
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as p... | mericon/Xp_Kernel_LGH850 | virt/drivers/video/backlight/ams369fg06.c | C | gpl-2.0 | 12,009 |
/*
* (C) Copyright 2003 Josef Baumgartner <josef.baumgartner@telex.de>
*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under t... | lxl1140989/dmsdk | uboot/u-boot-dm6291/arch/m68k/lib/time.c | C | gpl-2.0 | 5,061 |
/*
* Copyright (c) 2013-2014 TRUSTONIC LIMITED
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will... | CoderSherlock/Mondroid | kernelsource/msm/drivers/gud/MobiCoreKernelApi/session.c | C | gpl-2.0 | 5,372 |
/*
* Copyright © 2006-2007 Intel Corporation
* Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without... | NooNameR/Sense4.0-kernel | drivers/gpu2/drm/i915/intel_lvds.c | C | gpl-2.0 | 33,631 |
/*
* Mediatek SoCs General-Purpose Timer handling.
*
* Copyright (C) 2014 Matthias Brugger
*
* Matthias Brugger <matthias.bgg@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation... | AiJiaZone/linux-4.0 | virt/drivers/clocksource/mtk_timer.c | C | gpl-2.0 | 7,190 |
/*
* Driver for the Solomon SSD1307 OLED controller
*
* Copyright 2012 Free Electrons
*
* Licensed under the GPLv2 or later.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/fb.h>
#include <linux/uaccess.h>
#include <linux/of_device.h>
#include <linux/of_gpio.h>
#incl... | mericon/Xp_Kernel_LGH850 | virt/drivers/video/fbdev/ssd1307fb.c | C | gpl-2.0 | 14,012 |
/*
* linux/arch/arm/plat-versatile/platsmp.c
*
* Copyright (C) 2002 ARM Ltd.
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/init... | dperezde/little-penguin | linux/arch/arm/plat-versatile/platsmp.c | C | gpl-2.0 | 2,192 |
/*
* Real-time clock driver for MPC5121
*
* Copyright 2007, Domen Puncer <domen.puncer@telargo.com>
* Copyright 2008, Freescale Semiconductor, Inc. All rights reserved.
* Copyright 2011, Dmitry Eremin-Solenikov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the ... | WukLab/Hotpot | hotpot-kernel/drivers/rtc/rtc-mpc5121.c | C | gpl-2.0 | 10,449 |
/*
u8g_pb.c
common procedures for the page buffer
Universal 8bit Graphics Library
Copyright (c) 2011, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redist... | rossonet/JavaAgent | utiliti/Marlin/RAM/ArduinoAddons/Arduino_1.6.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_pb.c | C | agpl-3.0 | 4,396 |
/*
* Arch related setup for Hexagon
*
* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
... | WukLab/Hotpot | hotpot-kernel/arch/hexagon/kernel/setup.c | C | gpl-2.0 | 3,774 |
/*
* originally written by: Kirk Reiser <kirk@braille.uwo.ca>
* this version considerably modified by David Borowski, david575@rogers.com
*
* Copyright (C) 1998-99 Kirk Reiser.
* Copyright (C) 2003 David Borowski.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of t... | mericon/Xp_Kernel_LGH850 | virt/drivers/staging/speakup/speakup_apollo.c | C | gpl-2.0 | 7,309 |
/*
* Copyright (c) 2007-2008 Atheros Communications Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" A... | wkritzinger/asuswrt-merlin | release/src-rt-7.x.main/src/linux/linux-2.6.36/drivers/staging/otus/wrap_mem.c | C | gpl-2.0 | 2,742 |
/*
* arch/arm/mach-orion5x/d2net-setup.c
*
* LaCie d2Network and Big Disk Network NAS setup
*
* Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, wheth... | WhiteBearSolutions/WBSAirback | packages/wbsairback-kernel-image/wbsairback-kernel-image-3.2.43/arch/arm/mach-orion5x/d2net-setup.c | C | apache-2.0 | 9,418 |
/**************************************************************************
*
* Copyright © 2009 VMware, Inc., Palo Alto, CA., USA
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to d... | mericon/Xp_Kernel_LGH850 | virt/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | C | gpl-2.0 | 21,903 |
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/* file name: cbiditst.c
* encoding: US-ASCII
* ... | junhuac/MQUIC | src/third_party/icu/source/test/cintltst/cbiditst.c | C | mit | 213,146 |
/*
*
* Bluetooth virtual HCI driver
*
* Copyright (C) 2000-2001 Qualcomm Incorporated
* Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
* Copyright (C) 2004-2006 Marcel Holtmann <marcel@holtmann.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under t... | mericon/Xp_Kernel_LGH850 | virt/drivers/bluetooth/hci_vhci.c | C | gpl-2.0 | 8,255 |
/*
* bnx2i_iscsi.c: QLogic NetXtreme II iSCSI driver.
*
* Copyright (c) 2006 - 2013 Broadcom Corporation
* Copyright (c) 2007, 2008 Red Hat, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mike Christie
* Copyright (c) 2014, QLogic Corporation
*
* This program is free software; you can redistribute it and... | systemdaemon/systemd | src/linux/drivers/scsi/bnx2i/bnx2i_iscsi.c | C | gpl-2.0 | 63,142 |
/*
* linux/fs/lockd/svclock.c
*
* Handling of server-side locks, mostly of the blocked variety.
* This is the ugliest part of lockd because we tread on very thin ice.
* GRANT and CANCEL calls may get stuck, meet in mid-flight, etc.
* IMNSHO introducing the grant callback into the NLM protocol was one
* of the wo... | cybernet/rhel7-kernel | kernel/fs/lockd/svclock.c | C | gpl-2.0 | 26,611 |
/*
* drm kms/fb cma (contiguous memory allocator) helper functions
*
* Copyright (C) 2012 Analog Device Inc.
* Author: Lars-Peter Clausen <lars@metafoo.de>
*
* Based on udl_fbdev.c
* Copyright (C) 2012 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of ... | ziqiaozhou/cachebar | source/drivers/gpu/drm/drm_fb_cma_helper.c | C | gpl-2.0 | 12,138 |
/* Disk protection for HP machines.
*
* Copyright 2008 Eric Piel
* Copyright 2009 Pavel Machek <pavel@suse.cz>
*
* GPLv2.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#inclu... | ysleu/RTL8685 | uClinux-dist/linux-2.6.x/Documentation/hwmon/hpfall.c | C | gpl-2.0 | 1,759 |
/*
* Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND TH... | tejaswanjari/SMR_FS-EXT4 | kernel/drivers/net/wireless/ath/wil6210/pcie_bus.c | C | gpl-2.0 | 7,624 |
/*
* Tegra host1x Command DMA
*
* Copyright (c) 2010-2013, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distribut... | dperezde/little-penguin | linux/drivers/gpu/host1x/hw/cdma_hw.c | C | gpl-2.0 | 9,139 |
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/ide.h>
#include <linux/bitops.h>
static const char *udma_str[] =
{ "UDMA/16", "UDMA/25", "UDMA/33", "UDMA/44",
"UDMA/66", "UDMA/100", "UDMA/133", "UDMA7" };
static const char *mwdma_str[] =... | JijonHyuni/HyperKernel-JB | virt/drivers/ide/ide-xfer-mode.c | C | gpl-2.0 | 6,790 |
/* crypto/md5/md5test.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non... | teeple/pns_server | work/install/node-v0.10.25/deps/openssl/openssl/test/md5test.c | C | gpl-2.0 | 4,736 |
/*
* fs/f2fs/data.c
*
* Copyright (c) 2012 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <l... | publicloudapp/csrutil | linux-4.3/fs/f2fs/data.c | C | mit | 39,210 |
/* PR c/29736 */
int __attribute__ ((vector_size (8), vector_size (8))) v; /* { dg-error "invalid vector type" } */
extern int __attribute__ ((vector_size (8))) w;
int __attribute__ ((vector_size (8))) w;
void
foo ()
{
v = v + v;
w = w + w;
}
| SanDisk-Open-Source/SSD_Dashboard | uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.dg/pr29736.c | C | gpl-2.0 | 250 |
/*
* AMD CPU Microcode Update Driver for Linux
* Copyright (C) 2008-2011 Advanced Micro Devices Inc.
*
* Author: Peter Oruba <peter.oruba@amd.com>
*
* Based on work by:
* Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
*
* Maintainers:
* Andreas Herrmann <herrmann.der.user@googlemail.com>
* Borislav Pe... | SanDisk-Open-Source/SSD_Dashboard | uefi/linux-source-3.8.0/arch/x86/kernel/microcode_amd.c | C | gpl-2.0 | 11,001 |
/*
* Copyright (C) 2012 Altera Corporation
* Copyright (c) 2011 Picochip Ltd., Jamie Iles
*
* Modified from mach-picoxcell/time.c
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundati... | eabatalov/au-linux-kernel-autumn-2017 | linux/drivers/clocksource/dw_apb_timer_of.c | C | gpl-3.0 | 4,563 |
// SPDX-License-Identifier: GPL-2.0
/*
* Test for x86 KVM_CAP_MSR_PLATFORM_INFO
*
* Copyright (C) 2018, Google LLC.
*
* This work is licensed under the terms of the GNU GPL, version 2.
*
* Verifies expected behavior of controlling guest access to
* MSR_PLATFORM_INFO.
*/
#define _GNU_SOURCE /* for program_invo... | openwrt-es/linux | tools/testing/selftests/kvm/x86_64/platform_info_test.c | C | gpl-2.0 | 2,731 |
/*
* wm8997.c -- WM8997 ALSA SoC Audio driver
*
* Copyright 2012 Wolfson Microelectronics plc
*
* Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* publish... | anoever/thunderbolt | sound/soc/codecs/wm8997.c | C | gpl-2.0 | 41,128 |
/*
* Block device elevator/IO-scheduler.
*
* Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
*
* 30042000 Jens Axboe <axboe@kernel.dk> :
*
* Split the elevator a bit so that it is possible to choose a different
* one or even write a new "plug in". There are three pieces:
* - elevator_fn, inserts a ... | JijonHyuni/HyperKernel-JB | virt/block/elevator.c | C | gpl-2.0 | 25,046 |
#include "io.h"
int main(void)
{
long long rd, rs, rt, result, dspreg, dspresult;
rs = 0x123456787FFF8010;
rt = 0x1111111100018000;
result = 0x2345678980000010;
dspresult = 0x1;
__asm
("addq.qh %0, %2, %3\n\t"
"rddsp %1\n\t"
: "=r"(rd), "=r"(dspreg)
: "r"(rs... | emonty/vhd-util | tools/qemu-xen/tests/tcg/mips/mips64-dsp/addq_qh.c | C | gpl-2.0 | 511 |
/*
V4L2 controls framework implementation.
Copyright (C) 2010 Hans Verkuil <hverkuil@xs4all.nl>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, ... | Jarbu12/Xperia-M-Kernel | kernel/drivers/media/video/v4l2-ctrls.c | C | gpl-3.0 | 72,190 |
// SPDX-License-Identifier: GPL-2.0-only
/*
* STMicroelectronics accelerometers driver
*
* Copyright 2012-2013 STMicroelectronics Inc.
*
* Denis Ciocca <denis.ciocca@st.com>
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <... | mpe/powerpc | drivers/iio/accel/st_accel_core.c | C | gpl-2.0 | 30,598 |
// SPDX-License-Identifier: GPL-2.0+
/* Synopsys DesignWare 8250 library. */
#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/serial_8250.h>
#include <linux/serial_core.h>
#include "8250_dwlib.h"
/* Offsets for the DesignWare specific registers */
#d... | mpe/powerpc | drivers/tty/serial/8250/8250_dwlib.c | C | gpl-2.0 | 3,853 |
/*
* wm8955.c -- WM8955 ALSA SoC Audio driver
*
* Copyright 2009 Wolfson Microelectronics plc
*
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published b... | bestmjh47/android_kernel_samsung_aries | sound/soc/codecs/wm8955.c | C | gpl-2.0 | 30,428 |
/*
* Copyright (c) 2015-2017 Contributors as noted in the AUTHORS file
*
* This file is part of Solo5, a unikernel base layer.
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose with or without fee is hereby granted, provided
* that the above copyright notice and this permiss... | djwillia/solo5 | kernel/ukvm/time.c | C | isc | 1,193 |
#include <stdio.h>
#include <common/vec.h>
typedef int item_t;
typedef FLAT_VEC(, item_t) vec_t;
VEC_GEN(, vec_, vec_t, item_t)
void show_vec(vec_t *vec)
{
size_t i;
printf("vec size: %li\n", VEC_COUNT(vec));
for (i = 0; i < VEC_COUNT(vec); i++)
printf("%i\n", VEC_AT(vec, i));
}
int main(void)
{
vec_t vec =... | electromatter/common | tests/vec_test.c | C | isc | 664 |
/* $OpenBSD: cache_sh4.c,v 1.6 2010/01/01 13:20:33 miod Exp $ */
/* $NetBSD: cache_sh4.c,v 1.15 2005/12/24 23:24:02 perry Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by UCHIYAMA Yasushi.
*
* Re... | orumin/openbsd-efivars | arch/sh/sh/cache_sh4.c | C | isc | 11,533 |
/* ISC license. */
#include <signal.h>
#include <skalibs/strerr2.h>
#include <skalibs/sig.h>
#include <skalibs/djbunix.h>
#include <skalibs/selfpipe.h>
#include "s6-svlisten.h"
int s6_svlisten_selfpipe_init (void)
{
register int spfd = selfpipe_init() ;
if (spfd < 0) strerr_diefu1sys(111, "selfpipe_init") ;
if ... | rmoorman/s6 | src/supervision/s6_svlisten_signal_handler.c | C | isc | 754 |
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "generic.h"
#include "array.g.h"
#include "misc.g.h"
#include "matrix.h"
#include "matrix.g.h"
T *mcopy(T dest[static M*N], const T src[static M*N])
{
return memcpy(dest, src, sizeof (T [M*N]));
}
static T rnd(T init)
{
(void)in... | cventus/otivm | src/gm/gen/matrix.g.c | C | isc | 2,856 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int x, y;
char c[100];
scanf("%d %d", &x, &y);
gets(c);
gets(c);
printf("printing ints: %d %d\n", x, y);
printf("printing gets contents: %s\n", c);
return 0;
}
| sazid/codes | dawn_of_programming_contest/string_test.c | C | mit | 242 |
/*
Copyright (C) <2010-2011> Karl Hiramoto <karl@hiramoto.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... | karlhiramoto/nfqwf | Rules.c | C | mit | 6,452 |
#include <stdio.h>
int digits[9] = {0};
void take_input() {
int input, temp, digit, print = 0;
scanf("%d", &input);
if (input <= 0)
return;
temp = input;
while (temp != 0) {
digit = temp % 10;
if (digits[digit] == 0) {
print = 1;
break;
}
... | GautamGupta/fall14-cs137 | assignments/a6/midterm5.c | C | mit | 696 |
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
* Copyright (c) 2005-2013, International Business Machines Corporation and
* others. All Rights Reserved.
**************... | quyse/inanity | deps/icu/repo/source/test/cintltst/utexttst.c | C | mit | 8,513 |
#include <stdio.h>
#define __USE_XOPEN2K
#include <stdlib.h>
#if defined (__GNUC__) && ! defined (__INTEL_COMPILER)
#include <x86intrin.h>
#else
#include <immintrin.h>
#endif
#include <sys/time.h>
#include <assert.h>
#include <math.h>
#include "defs.h"
#include "utils.h"
#include "progressbar.h"
#ifdef ISPC_AVAIL
#... | manodeep/pairwise | all_pairwise/pairwise_3d.c | C | mit | 19,056 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE129_listen_socket_14.c
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE129.label.xml
Template File: sources-sinks-14.tmpl.c
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: listen_socke... | maurer/tiamat | samples/Juliet/testcases/CWE122_Heap_Based_Buffer_Overflow/s06/CWE122_Heap_Based_Buffer_Overflow__c_CWE129_listen_socket_14.c | C | mit | 15,278 |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/********
* IMG Writer - Program for write image files.
*
* Distributed under the MIT license.
*
* Programmed by Luiz Felipe
* GitHub: https://github.com/Silva97
********/
int getarg(int argc, char* argv[], char* arg);
int fsize(char fn... | DieBoy/imgwriter | imgw.c | C | mit | 3,068 |
#include "yaml_private.h"
/*
* API functions.
*/
YAML_DECLARE(int)
yaml_emitter_open(yaml_emitter_t *emitter);
YAML_DECLARE(int)
yaml_emitter_close(yaml_emitter_t *emitter);
YAML_DECLARE(int)
yaml_emitter_dump(yaml_emitter_t *emitter, yaml_document_t *document);
/*
* Clean up functions.
*/
static void
yaml_e... | mingodad/h2o | deps/yaml/src/dumper.c | C | mit | 10,079 |
/*!
* @brief Runner of tests for the lexer.
*/
#include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "clint.h"
#include "helper.h"
#include "tree.h"
static bool check(bool full, char *input, const char *expected)
{
static char buffer[20... | loyd/clint | test/test-parser.c | C | mit | 3,489 |
/************************************************
* GW KV
* https://github.com/gwAdvNet2015/gw-kv-store
*
* Copyright 2015 Tim Wood, Phil Lopreiato,
* Eric Armbrust, Neel Shah
*
* This program is licensed under the MIT license.
*
* A little help from:
* http://beej.us/guide/bgnet/
*... | gwAdvNet2015/gw-kv-store | server/server-kv-run.c | C | mit | 2,491 |
#include "yinyang.h"
#include "kmeans_utils.h"
#include "../../utils/matrix/csr_matrix/csr_to_vector_list.h"
#include "../../utils/matrix/vector_list/vector_list_math.h"
#include "../../utils/matrix/csr_matrix/csr_math.h"
#include "../../utils/vector/common/common_vector_math.h"
#include "../../utils/vector/sparse/spa... | thomas-bottesch/fcl | algorithms/kmeans/yinyang.c | C | mit | 20,368 |
#include <stdlib.h>
#include <cml/easings.h>
#include <cml/math.h>
/* Easing functions - Sine */
__CML_EXTERN_INLINE double
cml_ease_sine_in(double p)
{
return cml_sin((p - 1.0) * M_PI_2) + 1.0;
}
__CML_EXTERN_INLINE double
cml_ease_sine_out(double p)
{
return cml_sin(p * M_PI_2);
}
__CML_EXTERN_I... | CMATHL/cml | cml/src/easings/sine.c | C | mit | 416 |
#include <stdio.h>
void copy_arr(double [], double [], int);
void copy_ptr(double *, double *, int);
int main(void)
{
double source[5] = {1.1, 2.2, 3.3, 4.4, 5.5};
double target1[5], target2[5];
copy_arr(source, target1, 5);
copy_ptr(source, target2, 5);
return 0;
}
void copy_arr(do... | Gigalomaniac/CPrimerPlus | ch10/2.c | C | mit | 544 |
#include <stddef.h>
#define _GNU_SOURCE
#include <sys/uio.h>
#include <sys/socket.h>
#include "brubeck.h"
#ifdef __GLIBC__
# if ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12)))
# define HAVE_RECVMMSG 1
# endif
#endif
#define MAX_PACKET_SIZE 512
#ifdef HAVE_RECVMMSG
static void statsd_run_recvmmsg(... | IonicaBizauKitchen/brubeck | src/samplers/statsd.c | C | mit | 7,290 |
/*
FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.
FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
***************************************************************************
* ... | andyOsaft/02_SourceCode | freeRTOS/FreeRTOSV7.4.0/FreeRTOSV7.4.0/FreeRTOS/Demo/msp430_GCC/ParTest/ParTest.c | C | mit | 9,205 |
/*
* Name:
* Section:
* Assignment:
* Date:
* */
#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<time.h>
#include<string.h>
#define MAX_STR_LEN 25
typedef struct Data_ {
char *name;
struct Data_ *nextData;
}Data;
// KEEP THIS STRUCTURE
typedef struct Timer_ {
double start;
double end;
}Timer;
... | mremtf/assignments | c/cs2050Solutions/hw2/hw2_template.c | C | mit | 4,027 |
#include "common.h"
#include "str.h"
#include "dataset.h"
#include "fill.h"
#include "inspect.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
Dataset dataset1;
read_dataset(&dataset1, "./samples/data2_in", "./samples/data2_ref");
fill_probability(&dataset1);
printf("score: %lf\n"... | ShinyaKato/2016_wcs_algorithm | group14/filltest.c | C | mit | 419 |
#include "util/hashtable.h"
#include "util/hash.h"
#include "type.h"
hashtable_t *types = NULL;
struct sui_type_impl *get_impl_for_type(const char *type) {
if (!types) {
return NULL;
}
return (struct sui_type_impl *)hashtable_get(types, type);
}
void set_impl_for_type(const char *type, struct sui_type_impl *imp... | GrayHatter/chopsui | type/impl.c | C | mit | 419 |
/*
* rt_rand.c
*
* Real-Time Workshop code generation for Simulink model "modell.mdl".
*
* Model Version : 1.149
* Real-Time Workshop version : 7.3 (R2009a) 15-Jan-2009
* C source code generated on : Tue Mar 12 15:06:30 2013
*
* Target selection: nidll.tlc
* Note: GRT includes extra infrastru... | NTNU-MCS/CS_EnterpriseI | 10 prev work/2013 Sundland/modell_nidll_rtw/rt_rand.c | C | mit | 2,007 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 by Sergey Fetisov <fsenok@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitat... | fetisov/lrndis | lrndis/dns-server/dnserver.c | C | mit | 4,878 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.