sysfs programming

Peter
2008-12-20T08:20:22Z

Hi ,
I am writing a project for my university and i am planning on using sysfs for my kernel module to communicate with user space , ive read some articles and i know how sysfs works, its just i dont know how the code should be written .
Could you please send me a sample code about how to create an attribute file at /sys/module/(some kernel module)/ please ?
thank you very much .