Mike Frysinger wrote: > On 7/25/07, Bernd Schmidt <[EMAIL PROTECTED]> wrote: >> Mike Frysinger wrote: >> > On 4/9/07, Zhang, Sonic <[EMAIL PROTECTED]> wrote: >> >> Changing the event table in run time is possible but dangerous, >> because >> >> your module walks around the kernel event framework and may break >> other >> >> drivers that register to the same event vector. In addition, Exporting >> >> the event table directly is not a good way. I think an optional kernel >> >> function, such as "Evt *replace_event_vector(Evt *event)", is better. >> > >> > the attached patch does that ... >> >> This isn't necessarily a safe interface - assume you have two modules >> which want to replace the same exception vector, and you have the >> following order: >> load A >> load B >> unload A >> unload B > > for simplicity sake, this was done on purpose with the idea being the > user should be smart enough to manage these things ... they should > know to keep the exceptions unique. > > you think that if the entry requested is not assigned to _ex_trap_c, > it should return -EBUSY ?
Possibly. Or maybe int set_vector(int, void (*)(void)); int restore_vector(int); which just return error codes, save the previous vector internally, and require being paired. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif _______________________________________________ Uclinux-dist-devel mailing list Uclinux-dist-devel@blackfin.uclinux.org http://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel