Less aggressive Makefiles
This commit is contained in:
4
Makefile
4
Makefile
@@ -37,10 +37,10 @@ $(EXECUTABLE): $(OBJECTS)
|
|||||||
@$(CC) $(CCFLAGS) $(DBFLAGS) -c $< -o $@
|
@$(CC) $(CCFLAGS) $(DBFLAGS) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OBJECTS) $(EXECUTABLE)
|
rm -f $(OBJECTS) $(EXECUTABLE)
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
rm -rf $(OBJECTS)
|
rm -f $(OBJECTS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -m755 -D $(EXECUTABLE) "$(INSTALLDIR)/$(EXECUTABLE)"
|
install -m755 -D $(EXECUTABLE) "$(INSTALLDIR)/$(EXECUTABLE)"
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ debug: $(SOURCES) $(EXECUTABLE)
|
|||||||
@echo ' Compiling debug with $(CCFLAGS)'
|
@echo ' Compiling debug with $(CCFLAGS)'
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OBJECTS) $(EXECUTABLE)
|
rm -f $(OBJECTS) $(EXECUTABLE)
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
rm -rf $(OBJECTS)
|
rm -f $(OBJECTS)
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ int total_queues;
|
|||||||
int start_msg_queue(void)
|
int start_msg_queue(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < total_queues; i++) {
|
for (i = 0; i < total_queues; i++) {
|
||||||
if (slot[i] == NULL) {
|
if (slot[i] == NULL) {
|
||||||
slot[i] = (struct msg_t *)calloc(100, sizeof(struct msg_t));
|
slot[i] = (struct msg_t *)calloc(100, sizeof(struct msg_t));
|
||||||
@@ -31,12 +32,13 @@ int start_job_queue(int poolsize)
|
|||||||
if (slot == NULL)
|
if (slot == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
total_queues = poolsize;
|
total_queues = poolsize;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int add_msg_to_queue(int id, struct msg_t buf)
|
int add_msg_to_queue(int id, struct msg_t buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 100; i++) {
|
for (i = 0; i < 100; i++) {
|
||||||
if (slot[id][i].meta.is_recv) {
|
if (slot[id][i].meta.is_recv) {
|
||||||
memcpy(&slot[id][i], &buf, sizeof(struct msg_t));
|
memcpy(&slot[id][i], &buf, sizeof(struct msg_t));
|
||||||
|
|||||||
Reference in New Issue
Block a user