09-21-2008
use uint32_t or uint64_t from inttypes.h
It guarantees same size on any platforms.
9 More Discussions You Might Find Interesting
1. Programming
#include <stdio.h>
void main()
{
int Index=1;
char *Type=NULL;
Type = (char *)Index;
printf("%s",Type);
}
Getting coredump (5 Replies)
Discussion started by: vijaysabari
5 Replies
2. Programming
What is the difference between int** func() and int*& func(). Can you please explain it with suitable example.
Thanks,
Devesh. (1 Reply)
Discussion started by: devesh
1 Replies
3. Programming
Is there any way to know the filename from an available file pointer. (2 Replies)
Discussion started by: bankpro
2 Replies
4. AIX
Hi All,
I have Network color laser printer which is to be configured in AIX5L.
The Model of the printer is OKI C3200.
Will it is supported with AIX 5..? I could not find any drivers for this.
Will any compatible drivers are available for this printer... I tried with the default drivers hplj-4... (2 Replies)
Discussion started by: helloajith
2 Replies
5. UNIX for Dummies Questions & Answers
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies
6. Programming
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
Discussion started by: sehang
3 Replies
7. Programming
int air_date='20100103'; //2010 - Jan - 03
/* My goal here is to subtract a day. */
int day = air_date % 100; //?????? Is this right?
//Are there any functions time/date for this type of date format?
:cool: (7 Replies)
Discussion started by: sepoto
7 Replies
8. Solaris
Hi I am getting the below error
/bin/mkdir -p ./obj/SunOS10_32/SingleThread/Debug/CC_5_3
/bin/mkdir -p ./bin/SunOS10_32/SingleThread/Debug/CC_5_3
CC -c -ptr./obj/SunOS10_32/SingleThread/Debug/CC_5_3 -V -I/opt/tuxedo/tuxedo11gR1/include -I. -I../../OBED_SA_1-27a/include... (1 Reply)
Discussion started by: deboprio
1 Replies
9. Solaris
Hi guys,
I am currently receiving the following output in /var/log/syslog and is occurring every second leading to /var directory being full after every 2 days.
Aug 20 17:32:29 opaldn1 sendmail: r7KCOlQm002517: ruleset=check_rcpt, arg1=<postmaster@silverapp6>, relay=, reject=450 4.4.0... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
LEARN ABOUT NETBSD
atomic_and_64_nv
ATOMIC_AND(3) BSD Library Functions Manual ATOMIC_AND(3)
NAME
atomic_and, atomic_and_32, atomic_and_uint, atomic_and_ulong, atomic_and_64, atomic_and_32_nv, atomic_and_uint_nv, atomic_and_ulong_nv,
atomic_and_64_nv -- atomic logical 'and' operations
SYNOPSIS
#include <sys/atomic.h>
void
atomic_and_32(volatile uint32_t *ptr, uint32_t bits);
void
atomic_and_uint(volatile unsigned int *ptr, unsigned int bits);
void
atomic_and_ulong(volatile unsigned long *ptr, unsigned long bits);
void
atomic_and_64(volatile uint64_t *ptr, uint64_t bits);
uint32_t
atomic_and_32_nv(volatile uint32_t *ptr, uint32_t bits);
unsigned int
atomic_and_uint_nv(volatile unsigned int *ptr, unsigned int bits);
unsigned long
atomic_and_ulong_nv(volatile unsigned long *ptr, unsigned long bits);
uint64_t
atomic_and_64_nv(volatile uint64_t *ptr, uint64_t bits);
DESCRIPTION
The atomic_and family of functions load the value of the variable referenced by ptr, perform a logical 'and' with the value bits, and store
the result back to the variable referenced by ptr in an atomic fashion.
The *_nv() variants of these functions return the new value.
The 64-bit variants of these functions are available only on platforms that can support atomic 64-bit memory access. Applications can check
for the availability of 64-bit atomic memory operations by testing if the pre-processor macro __HAVE_ATOMIC64_OPS is defined.
SEE ALSO
atomic_ops(3)
HISTORY
The atomic_and functions first appeared in NetBSD 5.0.
BSD
April 11, 2007 BSD