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
I need to make it so an autmated process which involves ssh, times out if ssh prompts for a password. Most of the time it shouldnt prompt for a password. But if it does i need it to time it out or get a status and stop the ssh and log that the ssh failed and move onto the next server. Is there any... (9 Replies)
hi gurus ,,
I have multiple files with same file pattern..in a particular directory
for ex: file20061101.trf
file20061102.trf
file20061103.trf
Each of the file has a header as column names..
My questions is how can i eliminate the first row of each of these... (11 Replies)
Hi All,
I have file
i have values like
----
112
113
109
112
109
I have another file
cat supplierDetails.txt
-------------------------
112|MIMUS|krishnaveni@google.com
113|MIMIRE|krishnaveni@google.com
114|MIMCHN|krishnaveni@google.com
115|CEL|krishnaveni@google.com... (10 Replies)
hi
i am new to shell and would like ask some question about shell
how am i suppose to count the number of fields with delementer example
a:b:c:d
would return me 4
how am i going to do it using shell??
what is the syntax for file locking?
thanks a lot (9 Replies)
I am trying to show how many users are logged into one of my systems. Using who -q it gives me a user count, but some users are logged in multiple times.
Is there any easy parameter that I can use to ignore/eliminate these duplicates??
Thanks (9 Replies)
Hi Experts,
I have a file as given below and want to filter out the filenames in it , by deleting left and right filds and to have the fllenames (There are spaces in the filename),
Sun Jan 11 11:20:10 2009 1 0 /home/output/file2311_recent.list user1 user2 0 done
Sun Jan 11 11:20:10 2009 1 0... (10 Replies)
I have a file with the following data. I want to start writing lines out of this file to another file only after the time is greater than 20:00:00 hours and the first job is U1KC000. I would like to be able to run this out of a script and pass the time and job(U1KC000) as an argument.
... (14 Replies)
Hi,
I am trying to create a text file from data retrieved from a query.The data retrieved is having this character '^L' at regular intervals of the data.
How can i eliminate this, Please find below the sample data.
I tried sed -e "s/\^L//g" to convert it, but with no luck
^LCODE*SERIAL... (11 Replies)
Hi guys, I'm try making to script for eliminate files rlogins.
path1='/home/*'
for i in `cat /etc/passwd |awk -F: '{print $6}'`; do
if test "$i" = "$path1"; then
echo $i
cd $i
if ; then
echo "$i/.rhosts detectado"|mail -s "rhosts" root
... (14 Replies)
Hi friends, I want to convert 24 hour timing to 12 hour please help me...
my data file looks like this..
13-Nov-2011 13:27:36 15.32044 72.68502
13-Nov-2011 12:08:31 15.31291 72.69807
16-Nov-2011 01:16:54 15.30844 72.74028
15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Hi All,
Please help me how to remove the records from the file if it is having more number of fields than the required one, before loading into stage
Here is the sample records. File is space delimited one
chandu 1121324 CC ( 2 spaces)
chandu balu 434657 DD (3 spaces) -- failing due to... (10 Replies)
I have a BASH script that runs a continuous loop, reading a line from a file, and then spawning a background process to use it. I've placed "date" commands inside it to see where it's slowing down, and everything inside -- including reading the line from the file -- is fast, but the loop bogs... (34 Replies)
Without objection, open to comments, I would like to eliminate this column in various views that show topics and threads (forum view, search results, etc).
https://www.unix.com/members/1-albums220-picture887.png
https://www.unix.com/members/1-albums220-picture888.png
Comments? (10 Replies)