Would it be acceptable that the automount handler is called from usbhost_storage.c, from a modularity point of view? Because that way it would be only a notification towards the work queue, using a mechanism that is already in place. I don't like the idea to have another kthread that does only wait for a notification/event and then schedules itself the automount work on the queue.

Absolutely not.  Please do not consider this.

It would be permissible to broadcast a notification but must not under any imaginable circumstances violate the modular architecture by calling across module boundaries.  That is the single highest and single most importaent architectural principle of the OS.  See https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629399 .  We must not allow the OS to be degraded in that way.  That is the direct route to spaghetti code.



See also the top-level INVIOLABLES.txt:

   Modular Architecture
   --------------------

      o The internal modular architecture of the OS must be maintained.
      o This means formalizing and documenting all internal interfaces
   (in the
        porting guide), minimal use of global variables at the
   interface, and
        only well defined functional interfaces.

That kind of hack you suggest is most strictly forbidden and shows a profound lack of understanding of the OS architecture.



Reply via email to