gparmer/Composite — pull request #91 by gedare (2014-07-17 18:44:09+00:00)
Title: cbufp and cstub refactor

Make cbuf and cbufp more similar
* Change cbuf_free from taking void* to cbuf_t
* Add tmem indicator to cbuf_t

Refactor cstub macros
* Fix bug of not preserving registers around sysenter
* Eliminate dead code
* Simplify interface by offering three basic macros:
** CSTUB_FN() to declare a function that makes an invocation
** CSTUB_INVOKE() for a regular invocation
** CSTUB_INVOKE_3RET() for an invocation that gets 3 return values
* Add doc in cstub.h
* Rewrite interface/torrent/stubs/c_stub.c to use the new macros.

Tested with:
* unit_cbuf.sh
* unit_torrent.sh