* Prefix / Naming USERCR API
@ 2010-04-06 2:02 Sukadev Bhattiprolu
[not found] ` <20100406020221.GA647-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Sukadev Bhattiprolu @ 2010-04-06 2:02 UTC (permalink / raw)
To: Oren Laadan, serue-r/Jw6+rmf7HQT0dZR+AlfA; +Cc: Containers
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 *
app_checkpoint()
app_restart()
In the future we may have additional apis like:
xxx_freeze()
xxx_migrate()
xxx_cr_advise() ?
Kernel api already uses some prefixes like (checkpoint, ckpt_ etc:
<linux/checkpoint.h>
<linux/checkpoint_hdr.h>
struct ckpt_hdr_header
struct ckpt_hdr
checkpoint(2)
restart(2)
#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_
cr_checkpoint.h, libcr.a
cr_checkpoint() cr_restart() cr_freeze() cr_migrate()
struct cr_checkpoint_args, struct cr_restart_args
acr_
Only advantage over 'cr_' is lesser likelihood of collision
acr_checkpoint.h, libacr.a
acr_checkpoint() acr_restart() acr_freeze() acr_migrate()
struct acr_checkpoint_args, struct acr_restart_args
lxcr_
lxcr_checkpoint.h, liblxcr.a
lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate()
struct lxcr_checkpoint_args, struct lxcr_restart_args
Other prefixes or naming suggestions ?
Thanks,
Sukadev
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <20100406020221.GA647-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: Prefix / Naming USERCR API [not found] ` <20100406020221.GA647-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2010-04-08 6:49 ` Michel Normand 2010-04-10 3:48 ` Sukadev Bhattiprolu 0 siblings, 1 reply; 5+ messages in thread From: Michel Normand @ 2010-04-08 6:49 UTC (permalink / raw) To: Sukadev Bhattiprolu; +Cc: Containers Le lundi 05 avril 2010 à 19:02 -0700, Sukadev Bhattiprolu a écrit : > 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 * > app_checkpoint() > app_restart() > > In the future we may have additional apis like: > > xxx_freeze() > xxx_migrate() > xxx_cr_advise() ? > > Kernel api already uses some prefixes like (checkpoint, ckpt_ etc: > > <linux/checkpoint.h> > <linux/checkpoint_hdr.h> > > struct ckpt_hdr_header > struct ckpt_hdr > > checkpoint(2) > restart(2) > > #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_ > cr_checkpoint.h, libcr.a > cr_checkpoint() cr_restart() cr_freeze() cr_migrate() > struct cr_checkpoint_args, struct cr_restart_args > acr_ > Only advantage over 'cr_' is lesser likelihood of collision > > acr_checkpoint.h, libacr.a > acr_checkpoint() acr_restart() acr_freeze() acr_migrate() > struct acr_checkpoint_args, struct acr_restart_args > > lxcr_ > lxcr_checkpoint.h, liblxcr.a > lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate() > struct lxcr_checkpoint_args, struct lxcr_restart_args I do not think lxcr_ prefix is a good choice as lxc is about container and could use different libraries for the checkpoint/restart function. --- Michel > > Other prefixes or naming suggestions ? > > Thanks, > > Sukadev _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Prefix / Naming USERCR API 2010-04-08 6:49 ` Michel Normand @ 2010-04-10 3:48 ` Sukadev Bhattiprolu [not found] ` <20100410034840.GA11028-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Sukadev Bhattiprolu @ 2010-04-10 3:48 UTC (permalink / raw) To: Michel Normand; +Cc: Containers | > So, what would be a good prefix ? | > | > cr_ | > cr_checkpoint.h, libcr.a | > cr_checkpoint() cr_restart() cr_freeze() cr_migrate() | > struct cr_checkpoint_args, struct cr_restart_args | > acr_ | > Only advantage over 'cr_' is lesser likelihood of collision | > | > acr_checkpoint.h, libacr.a | > acr_checkpoint() acr_restart() acr_freeze() acr_migrate() | > struct acr_checkpoint_args, struct acr_restart_args | > | > lxcr_ | > lxcr_checkpoint.h, liblxcr.a | > lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate() | > struct lxcr_checkpoint_args, struct lxcr_restart_args | | I do not think lxcr_ prefix is a good choice as lxc is about container | and could use different libraries for the checkpoint/restart function. I was thinking of lx as short for linux, but ok. we can drop lxcr_. Any NACKS to 'acr_' ? If not, I will go with it - for now :-) Sukadev ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20100410034840.GA11028-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: Prefix / Naming USERCR API [not found] ` <20100410034840.GA11028-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2010-04-10 13:06 ` Oren Laadan [not found] ` <4BC077B8.6060305-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Oren Laadan @ 2010-04-10 13:06 UTC (permalink / raw) To: Sukadev Bhattiprolu; +Cc: Containers Sukadev Bhattiprolu wrote: > | > So, what would be a good prefix ? > | > > | > cr_ > | > cr_checkpoint.h, libcr.a > | > cr_checkpoint() cr_restart() cr_freeze() cr_migrate() > | > struct cr_checkpoint_args, struct cr_restart_args > | > acr_ > | > Only advantage over 'cr_' is lesser likelihood of collision > | > > | > acr_checkpoint.h, libacr.a > | > acr_checkpoint() acr_restart() acr_freeze() acr_migrate() > | > struct acr_checkpoint_args, struct acr_restart_args > | > > | > lxcr_ > | > lxcr_checkpoint.h, liblxcr.a > | > lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate() > | > struct lxcr_checkpoint_args, struct lxcr_restart_args > | > | I do not think lxcr_ prefix is a good choice as lxc is about container > | and could use different libraries for the checkpoint/restart function. > > I was thinking of lx as short for linux, but ok. we can drop lxcr_. > > Any NACKS to 'acr_' ? If not, I will go with it - for now :-) > I vote for 'cr_' to match the terminology we use in the docs and emails ('c/r'). ... and for brevity :p Oren. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <4BC077B8.6060305-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>]
* Re: Prefix / Naming USERCR API [not found] ` <4BC077B8.6060305-eQaUEPhvms7ENvBUuze7eA@public.gmane.org> @ 2010-04-11 17:02 ` Serge E. Hallyn 0 siblings, 0 replies; 5+ messages in thread From: Serge E. Hallyn @ 2010-04-11 17:02 UTC (permalink / raw) To: Oren Laadan; +Cc: Containers, Sukadev Bhattiprolu Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): > > > Sukadev Bhattiprolu wrote: > > | > So, what would be a good prefix ? > > | > > > | > cr_ > > | > cr_checkpoint.h, libcr.a > > | > cr_checkpoint() cr_restart() cr_freeze() cr_migrate() > > | > struct cr_checkpoint_args, struct cr_restart_args > > | > acr_ > > | > Only advantage over 'cr_' is lesser likelihood of collision > > | > > > | > acr_checkpoint.h, libacr.a > > | > acr_checkpoint() acr_restart() acr_freeze() acr_migrate() > > | > struct acr_checkpoint_args, struct acr_restart_args > > | > > > | > lxcr_ > > | > lxcr_checkpoint.h, liblxcr.a > > | > lxcr_checkpoint() lxcr_restart() lxcr_freeze() lxcr_migrate() > > | > struct lxcr_checkpoint_args, struct lxcr_restart_args > > | > > | I do not think lxcr_ prefix is a good choice as lxc is about container > > | and could use different libraries for the checkpoint/restart function. > > > > I was thinking of lx as short for linux, but ok. we can drop lxcr_. > > > > Any NACKS to 'acr_' ? If not, I will go with it - for now :-) > > > > I vote for 'cr_' to match the terminology we use in the docs > and emails ('c/r'). > > ... and for brevity :p > > Oren. 'me too' ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-11 17:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 2:02 Prefix / Naming USERCR API Sukadev Bhattiprolu
[not found] ` <20100406020221.GA647-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-08 6:49 ` Michel Normand
2010-04-10 3:48 ` Sukadev Bhattiprolu
[not found] ` <20100410034840.GA11028-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-10 13:06 ` Oren Laadan
[not found] ` <4BC077B8.6060305-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-04-11 17:02 ` Serge E. Hallyn
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.