Kernel & User mode PRXes

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Phantom8
Posts: 30
Joined: Fri Jun 17, 2005 10:17 am

Kernel & User mode PRXes

Post by Phantom8 »

I'm trying get the networking working within a PRX module. First, I've implemented it as a kernel mode PRX. Then, I discovered the networking libraries doesn't work properly within a kernel PRX. Afterwards, I change my PRX into a User mode PRX, but this time I discovered many of the normal functions doesn't work, like fdprintf , etc. The strange thing think is my PRX will crash the system even if the fdprintf is linked and not called. But the same fdprintf works fine under kernel mode PRX. Is this normal?
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Yes because fdprintf is a kernel only function, when you are in user space you really should just use the normal libc, i.e. fprintf. Ensure you remove any USE_KERNEL_LIBC=1 lines in your makefile.
Phantom8
Posts: 30
Joined: Fri Jun 17, 2005 10:17 am

Post by Phantom8 »

TyRaNiD wrote:Yes because fdprintf is a kernel only function, when you are in user space you really should just use the normal libc, i.e. fprintf. Ensure you remove any USE_KERNEL_LIBC=1 lines in your makefile.
TyRaNiD, thanks a lot for the suggestion. I finally get the user mode PRX with networking function working.
Post Reply