1 #ifndef _SYS_PARAM_H 2 #define _SYS_PARAM_H 3 4 #include "los_config.h" 5 #include <limits.h> 6 7 #define MAXSYMLINKS 20 8 #define MAXHOSTNAMELEN 64 9 #define MAXNAMLEN 255 10 #define MAXPATHLEN PATH_MAX 11 #define NBBY 8 12 #define NGROUPS 32 13 #define CANBSIZ 255 14 #define NOFILE 256 15 #define NCARGS 131072 16 #define DEV_BSIZE 512 17 #define NOGROUP (-1) 18 19 #undef MIN 20 #undef MAX 21 #define MIN(a,b) (((a)<(b))?(a):(b)) 22 #define MAX(a,b) (((a)>(b))?(a):(b)) 23 24 #define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8)) 25 #define setbit(x,i) __bitop(x,i,|=) 26 #define clrbit(x,i) __bitop(x,i,&=~) 27 #define isset(x,i) __bitop(x,i,&) 28 #define isclr(x,i) !isset(x,i) 29 30 #define howmany(n,d) (((n)+((d)-1))/(d)) 31 #define roundup(n,d) (howmany(n,d)*(d)) 32 #define powerof2(n) !(((n)-1) & (n)) 33 34 #include <sys/resource.h> 35 #include <endian.h> 36 37 #endif 38