Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caitlin Ross
codes
Commits
9b95fe57
Commit
9b95fe57
authored
Mar 06, 2015
by
Jonathan Jenkins
Browse files
bye-bye callback stub
parent
a4cc1dfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Makefile.subdir
View file @
9b95fe57
...
...
@@ -96,8 +96,6 @@ src_libcodes_base_a_SOURCES = \
src/modelconfig/configstoreadapter.c
\
codes/txt_configfile.h
\
src/modelconfig/txt_configfile.c
\
src/util/codes-callbacks.h
\
src/util/codes-callbacks.c
\
src/util/codes_mapping.c
\
src/util/lp-type-lookup.c
\
src/util/configuration.c
\
...
...
src/util/codes-callbacks.c
deleted
100644 → 0
View file @
a4cc1dfe
/*
* Copyright (C) 2013 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#include "util/codes-callbacks.h"
int
codes_callback_create
(
uint64_t
srclp
,
uint64_t
event
,
uint64_t
reqid
,
codes_callback_t
*
cb
)
{
if
(
cb
==
NULL
)
return
-
1
;
cb
->
srclp
=
srclp
;
cb
->
event
=
event
;
cb
->
reqid
=
reqid
;
return
0
;
}
int
codes_callback_destroy
(
codes_callback_t
*
cb
)
{
if
(
cb
==
NULL
)
return
-
1
;
cb
->
srclp
=
0
;
cb
->
event
=
0
;
cb
->
reqid
=
0
;
return
0
;
}
int
codes_callback_invoke
(
codes_callback_t
*
cb
,
tw_lp
*
lp
)
{
tw_event
*
e
=
NULL
;
if
(
cb
==
NULL
)
return
-
1
;
/* generate callback event */
tw_event_new
(
cb
->
srclp
,
CODES_CALLBACK_TIME
,
lp
);
/* get the event msg */
tw_event_data
(
e
);
/* send the event */
tw_event_send
(
e
);
return
0
;
}
int
codes_callback_copy
(
codes_callback_t
*
dest
,
codes_callback_t
*
src
)
{
if
(
dest
==
NULL
)
return
-
1
;
if
(
src
==
NULL
)
return
-
1
;
dest
->
srclp
=
src
->
srclp
;
dest
->
event
=
src
->
event
;
dest
->
reqid
=
src
->
reqid
;
return
0
;
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
src/util/codes-callbacks.h
deleted
100644 → 0
View file @
a4cc1dfe
/*
* Copyright (C) 2013 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef CODES_CALLBACKS_H
#define CODES_CALLBACKS_H
#include <ross.h>
#include <stdint.h>
#include <stdlib.h>
#define CODES_CALLBACK_TIME 1
typedef
struct
{
uint64_t
srclp
;
uint64_t
event
;
uint64_t
reqid
;
}
codes_callback_t
;
/* callback function prototypes */
int
codes_callback_create
(
uint64_t
srclp
,
uint64_t
event
,
uint64_t
reqid
,
codes_callback_t
*
cb
);
int
codes_callback_destroy
(
codes_callback_t
*
cb
);
int
codes_callback_invoke
(
codes_callback_t
*
cb
,
tw_lp
*
lp
);
int
codes_callback_copy
(
codes_callback_t
*
dest
,
codes_callback_t
*
src
);
#endif
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment