Jim, That fits what I thought, primarily because it always returns a handle and the rest of the rules are implications. The last rule suggests that both remove_cb and a triggered one time callback would not be in the list of callbacks one can iterate over. I would advocate the same future plan I mentioned, align with VHPI. It cleans a couple things beyond this clarification. Regards, John Jim Vellenga wrote: > I asked an ex-VPI developer at Cadence who once served on the 1364 PLI > Task Force about handle lifetimes for one-time callbacks such as > cbReadWriteSynch. What he said (and presumably what NC and Verilog-XL > have implemented) is > > -- The routine vpi_register_cb() always returns a handle to the > callback. If the application does not intend to use the handle again > later, it should call vpi_free_object() to release the handle. > > -- When the one-time callback triggers, the callback is removed, but > the handle, if not already released, persists. The application should > call vpi_free_object(), if necessary, to release the handle. > > -- If the application calls vpi_remove_cb() before the callback has > triggered, vpi_remove_cb() both removes the callback and releases the > handle. > > -- It is an error for the application to call vpi_remove_cb() with a > handle to a one-time callback that has already triggered. > > Regards, > Jim Vellenga > > --------------------------------------------------------- > James H. Vellenga 978-262-6381 > Software Architect (FAX) 978-262-6636 > Cadence Design Systems, Inc. vellenga@cadence.com > 270 Billerica Rd > Chelmsford, MA 01824-4179 > "We all work with partial information." > ---------------------------------------------------------- > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 12 13:30:56 2008
This archive was generated by hypermail 2.1.8 : Wed Mar 12 2008 - 13:31:14 PDT