removed cb-impl.c and cb-impl.h
This commit is contained in:
parent
4b3e318428
commit
1aeee25ac6
@ -107,7 +107,6 @@ libhclx_la_SOURCES = \
|
||||
tmr.c hcl-tmr.h \
|
||||
xutl.c xutl-sa.h hcl-xutl.h \
|
||||
json.c hcl-json.h \
|
||||
cb-impl.h cb-impl.c \
|
||||
hcl-s.c hcl-s.h \
|
||||
hcl-c.c hcl-c.h
|
||||
libhclx_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
||||
|
@ -170,12 +170,10 @@ libhcl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
@ENABLE_HCLX_TRUE@libhclx_la_DEPENDENCIES = libhcl.la \
|
||||
@ENABLE_HCLX_TRUE@ $(am__DEPENDENCIES_5)
|
||||
am__libhclx_la_SOURCES_DIST = tmr.c hcl-tmr.h xutl.c xutl-sa.h \
|
||||
hcl-xutl.h json.c hcl-json.h cb-impl.h cb-impl.c hcl-s.c \
|
||||
hcl-s.h hcl-c.c hcl-c.h
|
||||
hcl-xutl.h json.c hcl-json.h hcl-s.c hcl-s.h hcl-c.c hcl-c.h
|
||||
@ENABLE_HCLX_TRUE@am_libhclx_la_OBJECTS = libhclx_la-tmr.lo \
|
||||
@ENABLE_HCLX_TRUE@ libhclx_la-xutl.lo libhclx_la-json.lo \
|
||||
@ENABLE_HCLX_TRUE@ libhclx_la-cb-impl.lo libhclx_la-hcl-s.lo \
|
||||
@ENABLE_HCLX_TRUE@ libhclx_la-hcl-c.lo
|
||||
@ENABLE_HCLX_TRUE@ libhclx_la-hcl-s.lo libhclx_la-hcl-c.lo
|
||||
libhclx_la_OBJECTS = $(am_libhclx_la_OBJECTS)
|
||||
libhclx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
@ -209,7 +207,6 @@ am__depfiles_remade = ./$(DEPDIR)/libhcl_la-bigint.Plo \
|
||||
./$(DEPDIR)/libhcl_la-read.Plo ./$(DEPDIR)/libhcl_la-std.Plo \
|
||||
./$(DEPDIR)/libhcl_la-sym.Plo ./$(DEPDIR)/libhcl_la-utf8.Plo \
|
||||
./$(DEPDIR)/libhcl_la-utl.Plo ./$(DEPDIR)/libhcl_la-xma.Plo \
|
||||
./$(DEPDIR)/libhclx_la-cb-impl.Plo \
|
||||
./$(DEPDIR)/libhclx_la-hcl-c.Plo \
|
||||
./$(DEPDIR)/libhclx_la-hcl-s.Plo \
|
||||
./$(DEPDIR)/libhclx_la-json.Plo ./$(DEPDIR)/libhclx_la-tmr.Plo \
|
||||
@ -471,7 +468,6 @@ libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_6)
|
||||
@ENABLE_HCLX_TRUE@ tmr.c hcl-tmr.h \
|
||||
@ENABLE_HCLX_TRUE@ xutl.c xutl-sa.h hcl-xutl.h \
|
||||
@ENABLE_HCLX_TRUE@ json.c hcl-json.h \
|
||||
@ENABLE_HCLX_TRUE@ cb-impl.h cb-impl.c \
|
||||
@ENABLE_HCLX_TRUE@ hcl-s.c hcl-s.h \
|
||||
@ENABLE_HCLX_TRUE@ hcl-c.c hcl-c.h
|
||||
|
||||
@ -599,7 +595,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-utf8.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-utl.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-xma.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhclx_la-cb-impl.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhclx_la-hcl-c.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhclx_la-hcl-s.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhclx_la-json.Plo@am__quote@ # am--include-marker
|
||||
@ -825,13 +820,6 @@ libhclx_la-json.lo: json.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhclx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhclx_la-json.lo `test -f 'json.c' || echo '$(srcdir)/'`json.c
|
||||
|
||||
libhclx_la-cb-impl.lo: cb-impl.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhclx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhclx_la-cb-impl.lo -MD -MP -MF $(DEPDIR)/libhclx_la-cb-impl.Tpo -c -o libhclx_la-cb-impl.lo `test -f 'cb-impl.c' || echo '$(srcdir)/'`cb-impl.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhclx_la-cb-impl.Tpo $(DEPDIR)/libhclx_la-cb-impl.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cb-impl.c' object='libhclx_la-cb-impl.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhclx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhclx_la-cb-impl.lo `test -f 'cb-impl.c' || echo '$(srcdir)/'`cb-impl.c
|
||||
|
||||
libhclx_la-hcl-s.lo: hcl-s.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhclx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhclx_la-hcl-s.lo -MD -MP -MF $(DEPDIR)/libhclx_la-hcl-s.Tpo -c -o libhclx_la-hcl-s.lo `test -f 'hcl-s.c' || echo '$(srcdir)/'`hcl-s.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhclx_la-hcl-s.Tpo $(DEPDIR)/libhclx_la-hcl-s.Plo
|
||||
@ -1025,7 +1013,6 @@ distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-utf8.Plo
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-utl.Plo
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-xma.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-cb-impl.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-hcl-c.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-hcl-s.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-json.Plo
|
||||
@ -1101,7 +1088,6 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-utf8.Plo
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-utl.Plo
|
||||
-rm -f ./$(DEPDIR)/libhcl_la-xma.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-cb-impl.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-hcl-c.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-hcl-s.Plo
|
||||
-rm -f ./$(DEPDIR)/libhclx_la-json.Plo
|
||||
|
2145
lib/cb-impl.c
2145
lib/cb-impl.c
File diff suppressed because it is too large
Load Diff
@ -1,88 +0,0 @@
|
||||
|
||||
#ifndef _CB_IMPL_H_
|
||||
#define _CB_IMPL_H_
|
||||
|
||||
#include <hcl.h>
|
||||
|
||||
|
||||
#if defined(_WIN32) || defined(__OS2__) || defined(__DOS__)
|
||||
# define HCL_IS_PATH_SEP(c) ((c) == '/' || (c) == '\\')
|
||||
#else
|
||||
# define HCL_IS_PATH_SEP(c) ((c) == '/')
|
||||
#endif
|
||||
|
||||
/* TODO: handle path with a drive letter or in the UNC notation */
|
||||
#define HCL_IS_PATH_ABSOLUTE(x) HCL_IS_PATH_SEP(x[0])
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HCL_EXPORT hcl_errnum_t hcl_vmprim_syserrstrb (
|
||||
hcl_t* hcl,
|
||||
int syserr_type,
|
||||
int syserr_code,
|
||||
hcl_bch_t* buf,
|
||||
hcl_oow_t len
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_assertfail (
|
||||
hcl_t* hcl,
|
||||
const hcl_bch_t* expr,
|
||||
const hcl_bch_t* file,
|
||||
hcl_oow_t line
|
||||
);
|
||||
|
||||
|
||||
HCL_EXPORT void* hcl_vmprim_alloc_heap (
|
||||
hcl_t* hcl,
|
||||
hcl_oow_t size
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_free_heap (
|
||||
hcl_t* hcl,
|
||||
void* ptr
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_vm_gettime (
|
||||
hcl_t* hcl,
|
||||
hcl_ntime_t* now
|
||||
);
|
||||
|
||||
HCL_EXPORT int hcl_vmprim_vm_sleep (
|
||||
hcl_t* hcl,
|
||||
const hcl_ntime_t* dur
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_dl_startup (
|
||||
hcl_t* hcl
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_dl_cleanup (
|
||||
hcl_t* hcl
|
||||
);
|
||||
|
||||
HCL_EXPORT void* hcl_vmprim_dl_open (
|
||||
hcl_t* hcl,
|
||||
const hcl_ooch_t* name,
|
||||
int flags
|
||||
);
|
||||
|
||||
HCL_EXPORT void hcl_vmprim_dl_close (
|
||||
hcl_t* hcl,
|
||||
void* handle
|
||||
);
|
||||
|
||||
HCL_EXPORT void* hcl_vmprim_dl_getsym (
|
||||
hcl_t* hcl,
|
||||
void* handle,
|
||||
const hcl_ooch_t* name
|
||||
);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
10
lib/hcl-c.c
10
lib/hcl-c.c
@ -801,7 +801,6 @@ hcl_client_t* hcl_client_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_client_p
|
||||
{
|
||||
hcl_client_t* client;
|
||||
hcl_t* hcl;
|
||||
hcl_vmprim_t vmprim;
|
||||
client_hcl_xtn_t* xtn;
|
||||
|
||||
client = (hcl_client_t*)HCL_MMGR_ALLOC(mmgr, HCL_SIZEOF(*client) + xtnsize);
|
||||
@ -811,18 +810,15 @@ hcl_client_t* hcl_client_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_client_p
|
||||
return HCL_NULL;
|
||||
}
|
||||
|
||||
HCL_MEMSET (&vmprim, 0, HCL_SIZEOF(vmprim));
|
||||
vmprim.log_write = log_write_for_dummy;
|
||||
vmprim.syserrstrb = hcl_vmprim_syserrstrb;
|
||||
vmprim.assertfail = hcl_vmprim_assertfail;
|
||||
|
||||
hcl = hcl_open(mmgr, HCL_SIZEOF(*xtn), 2048, &vmprim, errnum);
|
||||
hcl = hcl_openstdwithmmgr(mmgr, HCL_SIZEOF(*xtn), 2048, errnum);
|
||||
if (!hcl)
|
||||
{
|
||||
HCL_MMGR_FREE (mmgr, client);
|
||||
return HCL_NULL;
|
||||
}
|
||||
|
||||
hcl->vmprim.log_write = log_write_for_dummy;
|
||||
|
||||
xtn = (client_hcl_xtn_t*)hcl_getxtn(hcl);
|
||||
xtn->client = client;
|
||||
|
||||
|
27
lib/hcl-s.c
27
lib/hcl-s.c
@ -28,7 +28,6 @@
|
||||
#include "hcl-prv.h"
|
||||
#include "hcl-tmr.h"
|
||||
#include "hcl-xutl.h"
|
||||
#include "cb-impl.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -685,14 +684,13 @@ hcl_server_proto_t* hcl_server_proto_open (hcl_oow_t xtnsize, hcl_server_worker_
|
||||
proto->worker = worker;
|
||||
proto->exec_runtime_event_index = HCL_TMR_INVALID_INDEX;
|
||||
|
||||
#if 0
|
||||
/*proto->hcl = hcl_open(hcl_server_getmmgr(proto->worker->server), HCL_SIZEOF(*xtn), worker->server->cfg.actor_heap_size, &vmprim, HCL_NULL);*/
|
||||
#endif
|
||||
/* TODO: set the log write handerl to log_write .. */
|
||||
/* TODO: LARGE_PAGES */
|
||||
proto->hcl = hcl_openstdwithmmgr(hcl_server_getmmgr(proto->worker->server), HCL_SIZEOF(*xtn), worker->server->cfg.actor_heap_size, HCL_NULL);
|
||||
if (!proto->hcl) goto oops;
|
||||
|
||||
/* change the log_write primitive forcibly */
|
||||
proto->hcl->vmprim.log_write = log_write;
|
||||
|
||||
xtn = (worker_hcl_xtn_t*)hcl_getxtn(proto->hcl);
|
||||
xtn->proto = proto;
|
||||
|
||||
@ -1531,7 +1529,6 @@ hcl_server_t* hcl_server_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_server_p
|
||||
{
|
||||
hcl_server_t* server = HCL_NULL;
|
||||
hcl_t* hcl = HCL_NULL;
|
||||
hcl_vmprim_t vmprim;
|
||||
hcl_tmr_t* tmr = HCL_NULL;
|
||||
server_hcl_xtn_t* xtn;
|
||||
int pfd[2], fcv;
|
||||
@ -1544,21 +1541,11 @@ hcl_server_t* hcl_server_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_server_p
|
||||
return HCL_NULL;
|
||||
}
|
||||
|
||||
HCL_MEMSET (&vmprim, 0, HCL_SIZEOF(vmprim));
|
||||
vmprim.log_write = log_write_for_dummy;
|
||||
vmprim.syserrstrb = hcl_vmprim_syserrstrb;
|
||||
vmprim.assertfail = hcl_vmprim_assertfail;
|
||||
vmprim.dl_startup = hcl_vmprim_dl_startup;
|
||||
vmprim.dl_cleanup = hcl_vmprim_dl_cleanup;
|
||||
vmprim.dl_open = hcl_vmprim_dl_open;
|
||||
vmprim.dl_close = hcl_vmprim_dl_close;
|
||||
vmprim.dl_getsym = hcl_vmprim_dl_getsym;
|
||||
vmprim.vm_gettime = hcl_vmprim_vm_gettime;
|
||||
vmprim.vm_sleep = hcl_vmprim_vm_sleep;
|
||||
|
||||
hcl = hcl_open(mmgr, HCL_SIZEOF(*xtn), 2048, &vmprim, errnum);
|
||||
hcl = hcl_openstdwithmmgr(mmgr, HCL_SIZEOF(*xtn), 2048, errnum);
|
||||
if (!hcl) goto oops;
|
||||
|
||||
hcl->vmprim.log_write = log_write_for_dummy;
|
||||
|
||||
tmr = hcl_tmr_open(hcl, 0, 1024); /* TOOD: make the timer's default size configurable */
|
||||
if (!tmr)
|
||||
{
|
||||
@ -1568,7 +1555,7 @@ hcl_server_t* hcl_server_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_server_p
|
||||
|
||||
if (pipe(pfd) <= -1)
|
||||
{
|
||||
if (errnum) *errnum = hcl_vmprim_syserrstrb(hcl, 0, errno, HCL_NULL, 0);
|
||||
if (errnum) *errnum = hcl->vmprim.syserrstrb(hcl, 0, errno, HCL_NULL, 0);
|
||||
goto oops;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ typedef enum hcl_server_trait_t hcl_server_trait_t;
|
||||
typedef void (*hcl_server_log_write_t) (
|
||||
hcl_server_t* server,
|
||||
hcl_oow_t wid,
|
||||
hcl_bitmask_t mask,
|
||||
hcl_bitmask_t mask,
|
||||
const hcl_ooch_t* msg,
|
||||
hcl_oow_t len
|
||||
);
|
||||
|
10
lib/json.c
10
lib/json.c
@ -877,7 +877,6 @@ hcl_json_t* hcl_json_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_json_prim_t*
|
||||
{
|
||||
hcl_json_t* json;
|
||||
hcl_t* hcl;
|
||||
hcl_vmprim_t vmprim;
|
||||
json_hcl_xtn_t* xtn;
|
||||
|
||||
json = (hcl_json_t*)HCL_MMGR_ALLOC(mmgr, HCL_SIZEOF(*json) + xtnsize);
|
||||
@ -887,18 +886,15 @@ hcl_json_t* hcl_json_open (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_json_prim_t*
|
||||
return HCL_NULL;
|
||||
}
|
||||
|
||||
HCL_MEMSET (&vmprim, 0, HCL_SIZEOF(vmprim));
|
||||
vmprim.log_write = log_write_for_dummy;
|
||||
vmprim.syserrstrb = hcl_vmprim_syserrstrb;
|
||||
vmprim.assertfail = hcl_vmprim_assertfail;
|
||||
|
||||
hcl = hcl_open(mmgr, HCL_SIZEOF(*xtn), 2048, &vmprim, errnum);
|
||||
hcl = hcl_openstdwithmmgr(mmgr, HCL_SIZEOF(*xtn), 2048, errnum);
|
||||
if (!hcl)
|
||||
{
|
||||
HCL_MMGR_FREE (mmgr, json);
|
||||
return HCL_NULL;
|
||||
}
|
||||
|
||||
hcl->vmprim.log_write = log_write_for_dummy;
|
||||
|
||||
xtn = (json_hcl_xtn_t*)hcl_getxtn(hcl);
|
||||
xtn->json = json;
|
||||
|
||||
|
@ -2878,7 +2878,7 @@ hcl_t* hcl_openstdwithmmgr (hcl_mmgr_t* mmgr, hcl_oow_t xtnsize, hcl_oow_t heaps
|
||||
//if (large_pages)
|
||||
//{
|
||||
vmprim.alloc_heap = alloc_heap;
|
||||
vmprim.free_heap = free_heap;
|
||||
vmprim.free_heap = free_heap;
|
||||
//}
|
||||
vmprim.log_write = log_write;
|
||||
vmprim.syserrstrb = _syserrstrb;
|
||||
|
Loading…
Reference in New Issue
Block a user