Hi Anton In the last sentence, you mean the plug-in should call oh_evt_queue_push in the event_utils.c to add its event to the domain event queue, don't you?
On the other word, the plug-in also should call the function such as oh_add_resource in the xxx_utils.c to add the resource to the resource present table asynchronously And since each plug-in can call the function such as oh_evt_queue_push/ oh_add_resource, HPI will be responsible for the mutual exclusion issue. Am I right? BR /Zhu Jianhua -----Original Message----- From: Anton Pak [mailto:[email protected]] Sent: 2011年12月22日 12:48 To: [email protected]; Zhujianhua Subject: Re: [Openhpi-devel] questions about the event management This mechanism was for plug-ins that were not able to generate events themselves without periodic polling from above. Such plug-in should generate new events in its get_event function and should add them to oh_process_q synchronously. Seems no plug-in uses it now. Current mechanism is a plug-in adds its event to this queue asynchronously. Anton Pak On Thu, 22 Dec 2011 12:31:05 +0300, Zhujianhua <[email protected]> wrote: > In the HPI training materials, I can see that HPI will responsible for > collecting the event and putting the event into the event queue of each > session. > But in the OpenHPI code (Version is 3.0.0) , the function static > gpointer evtget_func(gpointer data) in threaded.c will call > oh_harvest_events > And oh_harvest_events just call the get_event function of each plugin , > don't put the event into the event queue "oh_process_q". > > So if each plugin don't put the event into the global event queue > "oh_process_q", how do process_hpi_event get the event and put it into > the event queue of each session? > > Thanks > > BR /ZHU Jianhua ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Openhpi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openhpi-devel
