Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#110858 - 13/08/2002 17:45 displayserver in hijack
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
I've been spending some evenings porting the hijack kftd portions and other relevant pieces of code to the rio/dell receiver kernel icw displayserver code, with positive results. I've just ran into a problem getting the socket in nonblocking mode for receiving button presses from the applet.
Maybe anyone(Mark) has an idea why this isn't working :

flags = sock->ops->fcntl(sock,F_GETFL,0);
flags |= O_NONBLOCK;
sock->ops->fcntl(sock, F_SETFL, flags)

I've also tried sock_poll, but that resulted in kernel-crashes. Setting the socket in nonblocking mode seems the most efficient way to handle input and output on the same stream in the same thread. Image update intervals are implemented using a timer and a semaphore, which seems to work OK, so no real need for select()/poll() either.

The version I've got running now is capable of showing the display at a framerate of about 5 frames/sec and is pretty stable.
If I got the receiver-stuff running completely I'll try to patch the native hijack code to include displayserver support for the empeg again...

_________________________
Frank van Gestel

Top
#110859 - 14/08/2002 14:41 Re: displayserver in hijack [Re: fvgestel]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
Never mind, I found the mistake I was making. I thought I had to use the flags of the msg struct to set nonblocking mode, like in sock_sendmsg. Instead it expects flags as the fourth parameter in sock_recvmsg. It seems to work now...
_________________________
Frank van Gestel

Top