br.h -> brlib.h
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _GENERIC_CLZ_H_
|
#ifndef _GENERIC_CLZ_H_
|
||||||
#define _GENERIC_CLZ_H_
|
#define _GENERIC_CLZ_H_
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
|
|
||||||
/* Adapted from: http://www-graphics.stanford.edu/%7Eseander/bithacks.html
|
/* Adapted from: http://www-graphics.stanford.edu/%7Eseander/bithacks.html
|
||||||
*/
|
*/
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _GENERIC_CTZ_H_
|
#ifndef _GENERIC_CTZ_H_
|
||||||
#define _GENERIC_CTZ_H_
|
#define _GENERIC_CTZ_H_
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
|
|
||||||
/* Adapted from: http://www-graphics.stanford.edu/%7Eseander/bithacks.html
|
/* Adapted from: http://www-graphics.stanford.edu/%7Eseander/bithacks.html
|
||||||
*/
|
*/
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _GENERIC_ILOG2_H_
|
#ifndef _GENERIC_ILOG2_H_
|
||||||
#define _GENERIC_ILOG2_H_
|
#define _GENERIC_ILOG2_H_
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See https://stackoverflow.com/a/11398748/3079831
|
* See https://stackoverflow.com/a/11398748/3079831
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _BITS_H
|
#ifndef _BITS_H
|
||||||
#define _BITS_H
|
#define _BITS_H
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
#include "bitops-emulated/generic-ctz.h"
|
#include "bitops-emulated/generic-ctz.h"
|
||||||
#include "bitops-emulated/generic-clz.h"
|
#include "bitops-emulated/generic-clz.h"
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* br.h - misc macros.
|
/* brlib.h - misc types/macros.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2021-2024 Bruno Raoult ("br")
|
* Copyright (C) 2021-2024 Bruno Raoult ("br")
|
||||||
* Licensed under the GNU General Public License v3.0 or later.
|
* Licensed under the GNU General Public License v3.0 or later.
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
* This header contains generic stuff.
|
* This header contains generic stuff.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _BR_H
|
#ifndef _BRLIB_H
|
||||||
#define _BR_H
|
#define _BRLIB_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -267,4 +267,4 @@ typedef signed char schar;
|
|||||||
({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
|
({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
|
||||||
|
|
||||||
|
|
||||||
#endif /* _BR_H */
|
#endif /* _BRLIB_H */
|
@@ -17,7 +17,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <br.h>
|
#include "brlib.h"
|
||||||
|
|
||||||
#define NANOSEC 1000000000 /* nano sec in sec */
|
#define NANOSEC 1000000000 /* nano sec in sec */
|
||||||
#define MILLISEC 1000000 /* milli sec in sec */
|
#define MILLISEC 1000000 /* milli sec in sec */
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <asm/bitsperlong.h>
|
#include <asm/bitsperlong.h>
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
#include "bitops.h"
|
#include "bitops.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#ifndef _PJWHASH_INLINE_H
|
#ifndef _PJWHASH_INLINE_H
|
||||||
#define _PJWHASH_INLINE_H
|
#define _PJWHASH_INLINE_H
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
|
|
||||||
#define THREE_QUARTERS ((int) ((BITS_PER_INT * 3) / 4))
|
#define THREE_QUARTERS ((int) ((BITS_PER_INT * 3) / 4))
|
||||||
#define ONE_EIGHTH ((int) (BITS_PER_INT / 8))
|
#define ONE_EIGHTH ((int) (BITS_PER_INT / 8))
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#ifndef _PJWHASH_H
|
#ifndef _PJWHASH_H
|
||||||
#define _PJWHASH_H
|
#define _PJWHASH_H
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* unsigned int pjwhash - PJW hash function
|
* unsigned int pjwhash - PJW hash function
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
||||||
#define POOL_NAME_LENGTH (16) /* max name length including trailing \0 */
|
#define POOL_NAME_LENGTH (16) /* max name length including trailing \0 */
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* Taken from linux kernel: lib/list_sort.c
|
* Taken from linux kernel: lib/list_sort.c
|
||||||
*/
|
*/
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
#include "list_sort.h"
|
#include "list_sort.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "likely.h"
|
#include "likely.h"
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "br.h"
|
#include "brlib.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "pool.h"
|
#include "pool.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
Reference in New Issue
Block a user