From: joern@sima.sintef.no (Jorn Amundsen)
Subject: Problems with aio on v3.2
Date: 1995/08/15 [thread overview]
Message-ID: <JOERN.95Aug15172911@nazgul.sima.sintef.no> (raw)
After upgrading our 3000/400 to DEC Unix v.3.2 this simple aio program
below seems not to work anymore. It works without problems on SGI
systems. It bails out before reaching the first executable line of
code with:
$ cc -g -o taio taio.c -laio -lpthreads
dbx taio
dbx version 3.11.8
Type 'help' for help.
(dbx) run
signal Segmentation fault at [port_allocate:6039 +0xc,0x3ff818088ec] Source not available
(dbx) file
./mach_user.c
I looked into the FAQ, but no clues. Does anybody have any pointers ??
Thank you.
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <aio.h>
main()
{
int fd, i;
static struct aiocb aiobuf;
fd = open("afile", O_CREAT | O_RDONLY, 0644);
aiobuf.aio_fildes = fd;
aiobuf.aio_offset = 0;
aiobuf.aio_buf = &i;
aiobuf.aio_nbytes = sizeof(int);
#if defined(__alpha)
aiobuf.aio_reqprio = AIO_PRIO_DFL;
aiobuf.aio_sigevent.sigev_notify = SIGEV_NONE;
#else defined(__sgi)
aiobuf.aio_sigevent.sigev_signo = 0;
#endif
i = -1;
aio_read(&aiobuf);
printf("i=%d\n", i);
sleep(10);
printf("i=%d\n", i);
}
Best Regards --Jorn Amundsen
--
+--------------------------------+------------------------------+
| Joern Amundsen | Jorn.Amundsen@SIMa.sintef.no |
| SINTEF Industrial Mathematics | +47-735-92092 (voice) |
| 7034 Trondheim, Norway | +47-735-92971 (fax) |
| http://www.sima.sintef.no/ | |
+--------------------------------+------------------------------+
reply other threads:[~1995-08-15 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox