Leonardo Marsaglia wrote: > Hello dave, first of all thanks for your answer > > What i'm trying to do is to link an external button to the halt command, to > power off the machine quickly, since the kernel has the acpi disconnected i > can't use the normal power off button in the motherboard. > > So i decided to create a component with a few lines in C to halt the machine > when i require. > > The problem is that i can't get comp working with that function... i made > and compiled with gcc a normal C executable file to halt the machine and > worked ok, but when i use comp i can't compile the component, there is a > problem with the stdlib.h library or something but i'm not sure. >
When you use 'comp' to compile a component, it makes a realtime component. Realtime components run in kernel memory and don't have access to standard libraries like stdlib.h. Fortunately the component you are making doesn't need to be a realtime one. It can run in userspace just fine, since it doesn't need to run at precisely controlled time intervals. There are a few userspace components in EMC2 already, you could use one of them as a template. Halstreamer and Halsampler both have userspace and realtime parts, but I suspect there is something even simpler you could use. I'm just not awake enough to recall what it is. Regards, John Kasunich ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
