Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imax(9) [netbsd man page]

IMAX(9) 						   BSD Kernel Developer's Manual						   IMAX(9)

NAME
imax, imin, lmax, lmin, max, min, ulmax, ulmin -- compare integers SYNOPSIS
int imax(int a, int b); int imin(int a, int b); long lmax(long a, long b); long lmin(long a, long b); u_int max(u_int a, u_int b); u_int min(u_int a, u_int b); u_long ulmax(u_long a, u_long b); u_long ulmin(u_long a, u_long b); DESCRIPTION
The imin(), lmin(), min(), and ulmin() functions return whichever argument is algebraically smaller, differing only in their argument and return types: these functions operate on, respectively, natural size, long, unsigned and unsigned long integers. The imax(), lmax(), max(), and ulmax() functions are identical except that they return the algebraically larger argument between a and b. SEE ALSO
ilog2(3) BSD
June 8, 2010 BSD

Check Out this Related Man Page

CASU(9) 						   BSD Kernel Developer's Manual						   CASU(9)

NAME
casueword, casueword32, casuword, casuword32 -- fetch, compare and store data from user-space SYNOPSIS
#include <sys/types.h> #include <sys/systm.h> int casueword(volatile u_long *base, u_long oldval, u_long *oldvalp, u_long newval); int casueword32(volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, uint32_t newval); u_long casuword(volatile u_long *base, u_long oldval, u_long newval); uint32_t casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval); DESCRIPTION
The casueword functions are designed to perform atomic compare-and-swap operation on the value in the usermode memory of the current process. The casueword routines reads the value from user memory with address base, and compare the value read with oldval. If the values are equal, newval is written to the *base. In case of casueword32() and casueword(), old value is stored into the (kernel-mode) variable pointed by *oldvalp. The userspace value must be naturally aligned. The callers of casuword() and casuword32() functions cannot distinguish between -1 read from userspace and function failure. RETURN VALUES
The casuword() and casuword32() functions return the data fetched or -1 on failure. The casueword() and casueword32() functions return 0 on success and -1 on failure. SEE ALSO
atomic(9), fetch(9), store(9) BSD
October 21, 2014 BSD
Man Page

4 More Discussions You Might Find Interesting

1. Programming

printf and imaxdif_t

i was playing with maxint stuff when i found that i could not find a propper way to do a printf() auf a imaxdiv_t. since nobody seems to use it google found nothing. i tried to find a PRIxy code but no success. example: #include <stdio.h> #include <inttypes.h> int main() { ... (2 Replies)
Discussion started by: grumpf
2 Replies

2. Infrastructure Monitoring

Need implementation of TCP, SNMP and WIMAX in Linux

Hi, Can anyone please provide the Open Source implmentation of the Following Protocols in Linux Operating Systems. A. SNMP B. TCP C. WIMAX MAC layer protocol. Thaniks Saurav (2 Replies)
Discussion started by: sauravbh
2 Replies

3. Red Hat

Need implementation of TCP, SNMP and WIMAX in Linux

(2 Replies)
Discussion started by: sauravbh
2 Replies

4. Ubuntu

Ubuntu dhclient and wimax problem

I use Ubuntu 9.10 Netbook Remix and Intel wimax drivers to connect to wimax networks, but recently I faced with some problems with connection even when the signal is available and it is at some proper level... Here is system log, which may concerns problem occurred: dhclient: Can't allocate... (0 Replies)
Discussion started by: Sapfeer
0 Replies