core: add_function_hook()
commitb7d1701786ce7de35c4c13b6d5c13ecedcef3f3b
authorDan Carpenter <error27@gmail.com>
Thu, 19 Mar 2009 13:40:16 +0000 (19 16:40 +0300)
committerDan Carpenter <error27@gmail.com>
Thu, 19 Mar 2009 13:40:16 +0000 (19 16:40 +0300)
tree289ff337ae8969cbc43f67e13edc0faee0a1326d
parentee85db41a447a5d03237d48e4803bc459c8a2644
core: add_function_hook()

Up to now every check has had a call back for every function.  Then they
all call strcmp() to see if it's one of the functions they care about.

The problem is that is slow for large numbers of functions.  The new way is
that you'll: add_function_hook("down", &lock_function, NULL);
The lock_function() will look at the arguments and set the state locked.
The last argument is for if you want to pass other data to lock_function().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Makefile
smatch.c
smatch.h
smatch_function_hooks.c [new file with mode: 0644]