/* $NetBSD: fegetround.c,v 1.1 2017/03/22 23:11:09 chs Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Chuck Silvers. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include __RCSID("$NetBSD: fegetround.c,v 1.1 2017/03/22 23:11:09 chs Exp $"); #include "namespace.h" #include #include #ifdef __weak_alias __weak_alias(fegetround,_fegetround) #endif int fegetround(void) { return __FER(fpgetround()); } lass='right' method='get' action='/netbsd/log/sys/modules/examples/panic_string'>
AgeCommit message (Collapse)Author
2021-10-21fix various typos, mainly in comments, but also in man pages and log messages.andvar
2020-01-30Align major numbers in example modules with sys/conf/majorskamil
Patch submitted by: Aditya Vardhan Padala (silv3r)
2018-05-29Introduce new example kernel module: panic_stringkamil
The panic_string module accepts input from a device file over the write(2) system call. It prints panic(9) message passed from user space, e.g.: echo "Hello world" > /dev/panic If a string is empty or contain only whitespaces it's ignored and panic(9) is not triggered. If a non printable character is passed within the input buffer, the rest of the string is ignored. This module performs the sync(8) operation before panic(9) to flush cache. Submitted by Harry Pantazis. Simplified and cleaned up by myself.