Sponsored Content
Full Discussion: Hi...Need Help
Top Forums Programming Hi...Need Help Post 17951 by jack_2205 on Thursday 21st of March 2002 11:58:43 AM
Old 03-21-2002
Hi...Need Help

Hi,

I am getting a bus error when i run the following code.

#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <errno.h>

main()
{
int semid,retval;
semid=semget(0x20,1,IPC_CREAT|0666);
retval= semctl(semid,0,GETVAL,0);
printf("The value returned by the Getval is %d\n",retval);
semctl(semid,0,SETVAL,1);
printf("HI2\n");
retval= semctl(semid,0,GETVAL,0);
printf("The value returned by the Getval is %d\n",retval);
}



The bus error is due to this statement semctl(semid,0,SETVAL,1);

Can any one help to solve the problem.

Ur help will be appreciated.

Thanks..Jack
 
IEEE1394IF(4)						   BSD Kernel Interfaces Manual 					     IEEE1394IF(4)

NAME
ieee1394if -- IEEE1394 High-performance Serial Bus SYNOPSIS
ieee1394if* at fwohci? DESCRIPTION
NetBSD provides machine-independent bus support and raw drivers for IEEE1394 interfaces. The ieee1394if driver consists of two layers: the controller and the bus layer. The controller attaches to a physical bus (like pci(4)). The ieee1394if bus attaches to the controller. Additional drivers can be attached to the bus. Up to 63 devices, including the host itself, can be attached to a IEEE1394 bus. The root node is dynamically assigned with a PHY device function. Also, the other IEEE1394 bus specific parameters, e.g., node ID, cycle master, isochronous resource manager and bus manager, are dynamically assigned, after bus reset is initiated. On the ieee1394if bus, every device is identified by an EUI 64 address. FILES
/dev/fw0.0 /dev/fwmem0.0 SEE ALSO
fwip(4), fwohci(4), pci(4), sbp(4), fwctl(8), sysctl(8) HISTORY
The ieee1394if driver first appeared in FreeBSD 5.0, as firewire. It was added to NetBSD 4.0 under its present name. AUTHORS
The ieee1394if driver was written by Katsushi Kobayashi and Hidetoshi Shimokawa for the FreeBSD project. It was added to NetBSD 4.0 by KIYOHARA Takashi. BUGS
See fwohci(4) for security notes. BSD
June 18, 2005 BSD
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy