Prefix / Naming USERCR API
sukadev at linux.vnet.ibm.com
Mon Apr 5 19:02:22 PDT 2010
Prefix / Function names for USERCR API
I guess the long term plan is to export the USERCR funtionality to management
or other applications as a library. We are trying to choose a good prefix for
the USERCR API.
The current prefix for the API is, which was cooked up on the fly, is
"app_". This prefix is currently used in structures/functions like:
struct app_checkpoint_args *
struct app_restart_args *
In the future we may have additional apis like:
Kernel api already uses some prefixes like (checkpoint, ckpt_ etc:
#define RESTART_TASKSELF 0x1
#define CHECKPOINT_SUBTREE 0x1
Having a prefix would make it easy to identify the API and avoid collision
with other libraries that the application might link against. Eg: the
"pam_" prefixes PAM api.
Having a prefix like "cr_" or "acr_" could cause some redundancy in some
names, like cr_checkpoint(), but is probably ok, like pam_authenticate() ?
So, what would be a good prefix ?
cr_checkpoint() cr_restart() cr_freeze() cr_migrate()
struct cr_checkpoint_args, struct cr_restart_args
Only advantage over 'cr_' is lesser likelihood of collision
acr_checkpoint() acr_restart() acr_freeze() acr_migrate()
struct acr_checkpoint_args, struct acr_restart_args
lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate()
struct lxcr_checkpoint_args, struct lxcr_restart_args
Other prefixes or naming suggestions ?
More information about the Containers