Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
0ee1bbb9
Commit
0ee1bbb9
authored
Mar 08, 2005
by
Timothy Stack
Browse files
Handle groups of event-sequences correctly and fix the build deps
again...
parent
898cf9a2
Changes
5
Hide whitespace changes
Inline
Side-by-side
event/sched/GNUmakefile.in
View file @
0ee1bbb9
...
...
@@ -61,17 +61,24 @@ OBJS = \
event-sched_rrpc: $(OBJS) event-sched.h ../lib/libevent.a
$(CXX) $(CFLAGS) -static $(LDFLAGS) -o $@ $(OBJS) $(ULXRLIBS) $(LIBS)
queue.o: event-sched.h
listNode.o: listNode.h event-sched.h
error-record.o: error-record.h event-sched.h rpc.h listNode.h ../lib/event.h
local-agent.o: local-agent.h event-sched.h rpc.h listNode.h ../lib/event.h
group-agent.o: group-agent.h local-agent.h event-sched.h rpc.h listNode.h ../lib/event.h
event-sched_rpc.o: event-sched.c local-agent.h event-sched.h rpc.h listNode.h ../lib/event.h
DEPS = \
error-record.h event-sched.h group-agent.h listNode.h \
local-agent.h node-agent.h rpc.h simulator-agent.h timeline-agent.h \
../lib/event.h
queue.o: $(DEPS)
listNode.o: $(DEPS)
error-record.o: $(DEPS)
local-agent.o: $(DEPS)
group-agent.o: $(DEPS)
simulator-agent.o: $(DEPS)
node-agent.o: $(DEPS)
event-sched_rpc.o: $(DEPS)
$(CC) $(CFLAGS) -DRPC -c -o $@ $<
rpc.o: rpc.cc rpc.h event-sched.h
$(CXX) $(CXXFLAGS) -DSSHRPC $(ULXRINC) -c $<
rrpc.o:
rpc.cc rpc.h event-sched.h
rrpc.o:
$(DEPS)
$(CXX) -g $(CXXFLAGS) -DSSLRPC $(ULXRINC) -c -o rrpc.o $<
install: event-sched_rrpc
...
...
@@ -79,7 +86,7 @@ install: event-sched_rrpc
$(INSTALL_PROGRAM) $< $(INSTALL_DIR)/opsdir/sbin/event-sched
-mkdir -p $(INSTALL_DIR)/opsdir/man/man8
$(INSTALL) -m 0644 $(SRCDIR)/event-sched.8 \
$(DESTDIR)
$(INSTALL_DIR)/opsdir/man/man8/event-sched.8
$(INSTALL_DIR)/opsdir/man/man8/event-sched.8
control-install: event-sched_rrpc
$(INSTALL_PROGRAM) $< $(INSTALL_SBINDIR)/event-sched
...
...
event/sched/group-agent.c
View file @
0ee1bbb9
...
...
@@ -275,7 +275,17 @@ static int group_agent_immediate(local_agent_t la, sched_event_t *se)
}
if
(
se
->
agent
.
m
[
1
]
->
handler
!=
NULL
)
{
local_agent_queue
(
se
->
agent
.
m
[
1
]
->
handler
,
se
);
if
(
se
->
agent
.
m
[
1
]
->
handler
->
la_flags
&
LAF_MULTIPLE
)
{
local_agent_queue
(
se
->
agent
.
m
[
1
]
->
handler
,
se
);
}
else
{
int
lpc
;
for
(
lpc
=
1
;
lpc
<=
ga
->
ga_count
;
lpc
++
)
{
local_agent_queue
(
ga
->
ga_agents
[
lpc
]
->
handler
,
se
);
}
}
retval
=
0
;
}
...
...
event/sched/local-agent.c
View file @
0ee1bbb9
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2004 University of Utah and the Flux Group.
* Copyright (c) 2004
, 2005
University of Utah and the Flux Group.
* All rights reserved.
*/
...
...
@@ -33,7 +33,7 @@ typedef struct _local_agent_event *local_agent_event_t;
int
local_agent_invariant
(
local_agent_t
la
)
{
assert
(
la
!=
NULL
);
assert
(
!
(
la
->
la_flags
&
~
(
LAF_IMMEDIATE
|
LAF_LOOPING
)));
assert
(
!
(
la
->
la_flags
&
~
(
LAF_IMMEDIATE
|
LAF_LOOPING
|
LAF_MULTIPLE
)));
lnCheck
(
&
la
->
la_queue
);
assert
(
la
->
la_handle
!=
NULL
);
assert
(
la
->
la_looper
!=
NULL
);
...
...
event/sched/local-agent.h
View file @
0ee1bbb9
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2004 University of Utah and the Flux Group.
* Copyright (c) 2004
, 2005
University of Utah and the Flux Group.
* All rights reserved.
*/
...
...
@@ -29,6 +29,9 @@ enum {
a separate thread. */
LAB_LOOPING
,
/*< Flag number used to indicate that the agent is
alive and in its event loop. */
LAB_MULTIPLE
,
/*< Flag number used to indicate that the agent can
handle a single event for multiple agents in a
group. */
LAB_MAX
};
...
...
@@ -36,6 +39,7 @@ enum {
enum
{
LAF_IMMEDIATE
=
(
1L
<<
LAB_IMMEDIATE
),
LAF_LOOPING
=
(
1L
<<
LAB_LOOPING
),
LAF_MULTIPLE
=
(
1L
<<
LAB_MULTIPLE
),
};
/**
...
...
event/sched/node-agent.cc
View file @
0ee1bbb9
...
...
@@ -90,6 +90,7 @@ node_agent_t create_node_agent(void)
retval
=
NULL
;
}
else
{
na
->
na_local_agent
.
la_flags
|=
LAF_MULTIPLE
;
na
->
na_local_agent
.
la_looper
=
node_agent_looper
;
retval
=
na
;
na
=
NULL
;
...
...
Write
Preview
Supports
Markdown
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