Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Problems with aio on v3.2
@ 1995-08-15  4:00 Jorn Amundsen
  0 siblings, 0 replies; only message in thread
From: Jorn Amundsen @ 1995-08-15  4:00 UTC (permalink / 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/     |                              |
  +--------------------------------+------------------------------+



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-08-15  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-08-15  4:00 Problems with aio on v3.2 Jorn Amundsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox