This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2019 Intel Corporation | |
* | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
#include <logging/log.h> | |
LOG_MODULE_REGISTER(aws_mqtt, LOG_LEVEL_DBG); | |
#include <zephyr.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/kernel.h> | |
#include <linux/module.h> | |
#include <linux/delay.h> | |
MODULE_LICENSE("GPL"); | |
DEFINE_PER_CPU(int, counter); | |
static int test_percpu_init(void) | |
{ | |
int num_cpus = num_online_cpus(); | |
int i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
#include <linux/smp.h> | |
#include <linux/sched.h> | |
#include <linux/kthread.h> | |
#include <linux/delay.h> | |
MODULE_LICENSE("GPL"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
#include <asm/current.h> | |
#include <linux/sched.h> | |
#include <generated/utsrelease.h> | |
#include <linux/version.h> | |
MODULE_LICENSE("GPL"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/init.h> | |
#include <linux/module.h> | |
#include <linux/slab.h> | |
#include <linux/mm.h> | |
#include <linux/moduleparam.h> | |
#include <asm/io.h> | |
static void *virtual_addr; | |
static phys_addr_t physical_addr; | |
int size = 1024; /* allocate 1024 bytes */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> /* for MODULE_* */ | |
#include <linux/printk.h> /* for pr_info */ | |
static int __init mod_init(void) | |
{ | |
if (request_module("crc7") > 0) | |
pr_info("request_module failed to load\n"); | |
else | |
pr_info("request_module loaded successfully\n"); | |
return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> /* for MODULE_*. module_* */ | |
#include <linux/printk.h> /* for pr_* */ | |
#include <linux/cpumask.h> /* for num_online_cpus */ | |
static int __init mod_init(void) | |
{ | |
pr_info("number of online cpus is %d\n", num_online_cpus()); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
static int myinit(void) | |
{ | |
pr_info("dump_stack myinit\n"); | |
dump_stack(); | |
pr_info("dump_stack after\n"); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
static int myinit(void) | |
{ | |
pr_alert("pr_alert\n"); | |
pr_crit("pr_crit\n"); | |
pr_err("pr_err"); | |
pr_warning("pr_warning\n"); | |
pr_notice("pr_notice\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/vermagic.h> | |
static int vermagic_init(void) | |
{ | |
pr_info("VERMAGIC_STRING = " VERMAGIC_STRING "\n"); | |
return 0; | |
} |
NewerOlder