Hello,

somehow I cannot find the for adding stuff around a function call.
Finding a function call that is called with a lock held is trivial:
  wined3d_mutex_lock();
  <...  iwine...@p( ... ) ...>
  wined3d_mutex_unlock();

But if I want to add the locks around the IWineD3D() calls that don't have them I fail:
+ wined3d_mutex_lock();
  <... iwine...@p( ... ) ...>
+ wined3d_mutex_unlock();
gives
Fatal error: exception Failure("13: no available token to attach to")

Basically I would need something like
@@ statement S; @@
+ wined3d_mutex_lock();
  S
+ wined3d_mutex_unlock();
where S is the smallest possible statement that contains the function call IWineD3D(). But how do I specify that? I have grepped through the examples but didn't find anything that looks similar to this problem.

Many thanks
bye
        michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to