hi all
i'm trying to execute a c program under linux RH and it gives me segmentation fault, this program was running under unix at&t
anybody kow what the problem could be?
thanx in advance
regards (2 Replies)
hello all,
I tried a program on an array to intialise array elements from the standard input device.it is an integer array of 5 elements.but after entering the 4th element it throws a message called "Segmentation Fault" and returns to the command prompt without asking for the 5th element.
... (3 Replies)
I have written a program which takes a directory as command line arguments and displays all the dir and files in it.
I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Hi,
I am having this segmentation fault not in the following program, bt. in my lab program . My lab program is horrible long so cannot post it here bt. I am using the following logic in my program which is giving the segmentation fault. Bt. if I run this sample program as it is it dosen't give... (3 Replies)
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char*... (1 Reply)
This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b:
int main()
{
mysqlpp::Connection conn(false);
if... (3 Replies)
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
I am passing a char* to the function "reverse" and when I execute it with gdb I get:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040083b in reverse (s=0x400b2b "hello") at pointersExample.c:72
72 *q = *p;
Attached is the source code.
I do not understand why... (9 Replies)
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT NETBSD
atomic_dec_ptr_nv
ATOMIC_DEC(3) BSD Library Functions Manual ATOMIC_DEC(3)NAME
atomic_dec, atomic_dec_32, atomic_dec_uint, atomic_dec_ulong, atomic_dec_ptr, atomic_dec_64, atomic_dec_32_nv, atomic_dec_uint_nv,
atomic_dec_ulong_nv, atomic_dec_ptr_nv, atomic_dec_64_nv -- atomic decrement operations
SYNOPSIS
#include <sys/atomic.h>
void
atomic_dec_32(volatile uint32_t *ptr);
void
atomic_dec_uint(volatile unsigned int *ptr);
void
atomic_dec_ulong(volatile unsigned long *ptr);
void
atomic_dec_ptr(volatile void *ptr);
void
atomic_dec_64(volatile uint64_t *ptr);
uint32_t
atomic_dec_32_nv(volatile uint32_t *ptr);
unsigned int
atomic_dec_uint_nv(volatile unsigned int *ptr);
unsigned long
atomic_dec_ulong_nv(volatile unsigned long *ptr);
void *
atomic_dec_ptr_nv(volatile void *ptr);
uint64_t
atomic_dec_64_nv(volatile uint64_t *ptr);
DESCRIPTION
The atomic_dec family of functions decrement (by one) 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_dec functions first appeared in NetBSD 5.0.
BSD April 11, 2007 BSD