Commit 0ee1bbb9 authored by Timothy Stack's avatar Timothy Stack

Handle groups of event-sequences correctly and fix the build deps

again...
parent 898cf9a2
......@@ -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
......
......@@ -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;
}
......
/*
* 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);
......
/*
* 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),
};
/**
......
......@@ -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;
......
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