Commit e7a12895 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Minor cleanup.

parent 5da2d319
...@@ -403,6 +403,18 @@ struct storeobj { ...@@ -403,6 +403,18 @@ struct storeobj {
* housekeeping fields parts of an object. * housekeeping fields parts of an object.
*/ */
enum obj_attr {
#define OBJ_ATTR(U, l) OA_##U,
#include "tbl/obj_attr.h"
#undef OBJ_ATTR
};
enum obj_flags {
#define OBJ_FLAG(U, l, v) OF_##U = v,
#include "tbl/obj_attr.h"
#undef OBJ_FLAG
};
struct objcore { struct objcore {
unsigned magic; unsigned magic;
#define OBJCORE_MAGIC 0x4d301302 #define OBJCORE_MAGIC 0x4d301302
...@@ -517,19 +529,6 @@ struct busyobj { ...@@ -517,19 +529,6 @@ struct busyobj {
struct vsb *synth_body; struct vsb *synth_body;
}; };
/* Object structure --------------------------------------------------*/
enum obj_attr {
#define OBJ_ATTR(U, l) OA_##U,
#include "tbl/obj_attr.h"
#undef OBJ_ATTR
};
enum obj_flags {
#define OBJ_FLAG(U, l, v) OF_##U = v,
#include "tbl/obj_attr.h"
#undef OBJ_FLAG
};
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
......
...@@ -64,7 +64,7 @@ obj_getobj(struct objcore *oc, struct dstat *ds) ...@@ -64,7 +64,7 @@ obj_getobj(struct objcore *oc, struct dstat *ds)
AN(ds); AN(ds);
AN(m->getobj); AN(m->getobj);
return (m->getobj(ds, oc)); return (m->getobj(oc, ds));
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
...@@ -346,7 +346,7 @@ ObjFreeObj(struct objcore *oc, struct dstat *ds) ...@@ -346,7 +346,7 @@ ObjFreeObj(struct objcore *oc, struct dstat *ds)
AN(ds); AN(ds);
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
AN(m->freeobj); AN(m->freeobj);
m->freeobj(ds, oc); m->freeobj(oc, ds);
} }
struct lru * struct lru *
......
...@@ -49,7 +49,7 @@ static const struct stevedore * volatile stv_next; ...@@ -49,7 +49,7 @@ static const struct stevedore * volatile stv_next;
*/ */
static struct object * __match_proto__(getobj_f) static struct object * __match_proto__(getobj_f)
default_oc_getobj(struct dstat *ds, struct objcore *oc) default_oc_getobj(struct objcore *oc, struct dstat *ds)
{ {
struct object *o; struct object *o;
...@@ -61,7 +61,7 @@ default_oc_getobj(struct dstat *ds, struct objcore *oc) ...@@ -61,7 +61,7 @@ default_oc_getobj(struct dstat *ds, struct objcore *oc)
} }
static void __match_proto__(freeobj_f) static void __match_proto__(freeobj_f)
default_oc_freeobj(struct dstat *ds, struct objcore *oc) default_oc_freeobj(struct objcore *oc, struct dstat *ds)
{ {
struct object *o; struct object *o;
......
...@@ -80,9 +80,9 @@ struct object { ...@@ -80,9 +80,9 @@ struct object {
/* -------------------------------------------------------------------*/ /* -------------------------------------------------------------------*/
typedef struct object *getobj_f(struct dstat *ds, struct objcore *oc); typedef struct object *getobj_f(struct objcore *oc, struct dstat *);
typedef void updatemeta_f(struct objcore *oc, struct dstat *); typedef void updatemeta_f(struct objcore *oc, struct dstat *);
typedef void freeobj_f(struct dstat *ds, struct objcore *oc); typedef void freeobj_f(struct objcore *oc, struct dstat *);
typedef struct lru *getlru_f(const struct objcore *oc); typedef struct lru *getlru_f(const struct objcore *oc);
struct storeobj_methods { struct storeobj_methods {
......
...@@ -388,7 +388,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg, ...@@ -388,7 +388,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
*/ */
static struct object * static struct object *
smp_oc_getobj(struct dstat *ds, struct objcore *oc) smp_oc_getobj(struct objcore *oc, struct dstat *ds)
{ {
struct object *o; struct object *o;
struct smp_seg *sg; struct smp_seg *sg;
...@@ -464,7 +464,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds) ...@@ -464,7 +464,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
struct smp_object *so; struct smp_object *so;
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
o = smp_oc_getobj(ds, oc); o = smp_oc_getobj(oc, ds);
AN(o); AN(o);
CAST_OBJ_NOTNULL(sg, oc->stobj->priv, SMP_SEG_MAGIC); CAST_OBJ_NOTNULL(sg, oc->stobj->priv, SMP_SEG_MAGIC);
...@@ -484,7 +484,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds) ...@@ -484,7 +484,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
} }
static void __match_proto__(freeobj_f) static void __match_proto__(freeobj_f)
smp_oc_freeobj(struct dstat *ds, struct objcore *oc) smp_oc_freeobj(struct objcore *oc, struct dstat *ds)
{ {
struct smp_seg *sg; struct smp_seg *sg;
struct smp_object *so; struct smp_object *so;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment