Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ddi_fls(9F) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ddi_ffs(9F)

NAME

ddi_ffs, ddi_fls − find first (last) bit set in a long integer

SYNOPSIS

#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int ddi_ffs(long mask)
int ddi_fls(long mask)

INTERFACE LEVEL

SPARC architecture specific (SPARC DDI). 

ARGUMENTS

mask A 32 bit argument value to search through. 

DESCRIPTION

The function ddi_ffs() takes its argument and returns the shift count that the first (least significant) bit set in the argument corresponds to. The function ddi_fls() does the same, only it returns the shift count for the last (most significant) bit set in the argument.

RETURN VALUES

N Returns a number from 1 to 31 which corresponds to the bit position of either the least significant (first) or most significant (last) bit set in the argument. 

CONTEXT

This function can be called from user or interrupt context. 

Sun Microsystems  —  Last change: 24 Oct 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026