Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xanadu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
SYNERG
xanadu
Commits
f06ee5c7
Commit
f06ee5c7
authored
Jan 21, 2021
by
Naman Dixit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed broken submodules for resource_manager
parent
a38a16ae
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4446 additions
and
15 deletions
+4446
-15
.gitmodules
.gitmodules
+0
-3
resource_system/src/arbiter/arbiter.c
resource_system/src/arbiter/arbiter.c
+4
-3
resource_system/src/arbiter/grunt_manager.c
resource_system/src/arbiter/grunt_manager.c
+1
-1
resource_system/src/common/nlib
resource_system/src/common/nlib
+0
-1
resource_system/src/common/nlib/nlib.h
resource_system/src/common/nlib/nlib.h
+4437
-0
resource_system/src/grunt/grunt.c
resource_system/src/grunt/grunt.c
+3
-6
resource_system/src/grunt/thread_manager.c
resource_system/src/grunt/thread_manager.c
+1
-1
No files found.
.gitmodules
View file @
f06ee5c7
[submodule "resource_system/src/common/cJSON"]
[submodule "resource_system/src/common/cJSON"]
path = resource_system/src/common/cJSON
path = resource_system/src/common/cJSON
url = https://github.com/DaveGamble/cJSON
url = https://github.com/DaveGamble/cJSON
[submodule "resource_system/src/common/nlib"]
path = resource_system/src/common/nlib
url = https://github.com/namandixit/nlib
[submodule "resource_system/src/common/inih"]
[submodule "resource_system/src/common/inih"]
path = resource_system/src/common/inih
path = resource_system/src/common/inih
url = https://github.com/benhoyt/inih
url = https://github.com/benhoyt/inih
resource_system/src/arbiter/arbiter.c
View file @
f06ee5c7
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#define logError(s, ...) err(s "\n", ##__VA_ARGS__)
#define logError(s, ...) err(s "\n", ##__VA_ARGS__)
#include "nlib/nlib.h"
#include "nlib/nlib.h"
#define stringEqual streq
#undef internal_malloc
#undef internal_malloc
#undef internal_free
#undef internal_free
...
@@ -67,8 +68,8 @@ Sint main (Sint argc, Char *argv[])
...
@@ -67,8 +68,8 @@ Sint main (Sint argc, Char *argv[])
signal
(
SIGINT
,
signalHandlerSIGINT
);
signal
(
SIGINT
,
signalHandlerSIGINT
);
{
// Init cJSON
{
// Init cJSON
cJSON_Hooks
hook
=
{.
malloc_fn
=
dl
malloc
,
cJSON_Hooks
hook
=
{.
malloc_fn
=
malloc
,
.
free_fn
=
dl
free
};
.
free_fn
=
free
};
cJSON_InitHooks
(
&
hook
);
cJSON_InitHooks
(
&
hook
);
}
}
...
@@ -89,7 +90,7 @@ Sint main (Sint argc, Char *argv[])
...
@@ -89,7 +90,7 @@ Sint main (Sint argc, Char *argv[])
Command
*
commands
=
NULL
;
Command
*
commands
=
NULL
;
Grunt_Tracker
gt
=
{
0
};
Grunt_Tracker
gt
=
{
0
};
Hash_Table
grunt_survey_map
=
htCreate
(
0
);
Hash_Table
grunt_survey_map
=
htCreate
();
Kafka
kafka
=
{
0
};
Kafka
kafka
=
{
0
};
...
...
resource_system/src/arbiter/grunt_manager.c
View file @
f06ee5c7
...
@@ -28,7 +28,7 @@ internal_function
...
@@ -28,7 +28,7 @@ internal_function
void
gruntTrackBegin
(
Grunt_Tracker
*
t
,
Grunt
g
)
void
gruntTrackBegin
(
Grunt_Tracker
*
t
,
Grunt
g
)
{
{
if
(
t
->
grunts
==
NULL
)
{
if
(
t
->
grunts
==
NULL
)
{
t
->
map
=
htCreate
(
0
);
t
->
map
=
htCreate
();
sbufAdd
(
t
->
grunts
,
(
Grunt
){
0
});
// SInce 0 index out of hash table will be invalid
sbufAdd
(
t
->
grunts
,
(
Grunt
){
0
});
// SInce 0 index out of hash table will be invalid
}
}
...
...
nlib
@
f71785e7
Subproject commit f71785e7c6a820e65c450d526c60519b250f3115
resource_system/src/common/nlib/nlib.h
0 → 100644
View file @
f06ee5c7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
resource_system/src/grunt/grunt.c
View file @
f06ee5c7
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
*/
*/
#include "nlib/nlib.h"
#include "nlib/nlib.h"
#define stringEqual streq
#undef internal_malloc
#undef internal_malloc
#undef internal_free
#undef internal_free
...
@@ -115,14 +116,10 @@ int main(int argc, char** argv)
...
@@ -115,14 +116,10 @@ int main(int argc, char** argv)
{
// Init third party libraries
{
// Init third party libraries
{
// Init cJSON
{
// Init cJSON
cJSON_Hooks
hook
=
{.
malloc_fn
=
dl
malloc
,
cJSON_Hooks
hook
=
{.
malloc_fn
=
malloc
,
.
free_fn
=
dl
free
};
.
free_fn
=
free
};
cJSON_InitHooks
(
&
hook
);
cJSON_InitHooks
(
&
hook
);
}
}
{
// Init
prom_collector_registry_default_init
();
}
}
}
Configuration
conf
=
{
0
};
Configuration
conf
=
{
0
};
...
...
resource_system/src/grunt/thread_manager.c
View file @
f06ee5c7
...
@@ -19,7 +19,7 @@ internal_function
...
@@ -19,7 +19,7 @@ internal_function
void
threadTrackBegin
(
Thread_Tracker
*
t
,
Thread
th
)
void
threadTrackBegin
(
Thread_Tracker
*
t
,
Thread
th
)
{
{
if
(
t
->
threads
==
NULL
)
{
if
(
t
->
threads
==
NULL
)
{
t
->
map
=
htCreate
(
0
);
t
->
map
=
htCreate
();
sbufAdd
(
t
->
threads
,
(
Thread
){
0
});
// SInce 0 index out of hash table will be invalid
sbufAdd
(
t
->
threads
,
(
Thread
){
0
});
// SInce 0 index out of hash table will be invalid
}
}
...
...
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