On Wed Aug 10 05, Daan Vreeken [PA4DAN] wrote:
>
> I can confirm that. I have tested the program on 5.4-RELEASE here. Testing
> your program (I called it "p") 10 times gives the following output :
>
> [EMAIL PROTECTED] for a in 0 1 2 3 4 5 6 7 8 9;do echo "starting p"; ./p ;done
> starting p
> starting p
> starting p
> Bus error (core dumped)
> starting p
> Bus error (core dumped)
> starting p
> starting p
> starting p
> Bus error (core dumped)
> starting p
> Bus error (core dumped)
> starting p
> starting p
> [EMAIL PROTECTED]
>
> However, opening /dev/io to gain IO privileges instead of using sysarch
> always
> works. I tested that with the following program :
>
> #include <fcntl.h>
>
> static inline void outb (unsigned short int port, unsigned char val) {
> __asm__ volatile ("outb %0,%1\n"::"a" (val), "d" (port) );
> }
>
> int main (void) {
>
> if (open("/dev/io", O_RDONLY) == -1) {
> printf("EEK!\n");
> exit(1);
> }
>
> outb(0x378, 0xff);
> }
>
> --- EOF ---
>
> grtz,
> Daan
Hmm...very odd. Should I file a bug report about this problem?
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"