implement ffsl and ffsll functions
per the resolution of Austin Group issue #617, these are accepted for XSI option in POSIX future and thus I'm treating them as standard functions.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#include <strings.h>
|
||||
#include "atomic.h"
|
||||
|
||||
int ffsl(long i)
|
||||
{
|
||||
return i ? a_ctz_l(i)+1 : 0;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <strings.h>
|
||||
#include "atomic.h"
|
||||
|
||||
int ffsll(long long i)
|
||||
{
|
||||
return i ? a_ctz_64(i)+1 : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user