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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mahendra Patel
xanadu
Commits
194a118a
Commit
194a118a
authored
Feb 26, 2021
by
NILANJAN DAW
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.cse.iitb.ac.in/synerg/xanadu
parents
81e31051
f06ee5c7
Changes
7
Hide 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 @
194a118a
[submodule "resource_system/src/common/cJSON"]
path = resource_system/src/common/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"]
path = resource_system/src/common/inih
url = https://github.com/benhoyt/inih
resource_system/src/arbiter/arbiter.c
View file @
194a118a
...
...
@@ -7,6 +7,7 @@
#define logError(s, ...) err(s "\n", ##__VA_ARGS__)
#include "nlib/nlib.h"
#define stringEqual streq
#undef internal_malloc
#undef internal_free
...
...
@@ -67,8 +68,8 @@ Sint main (Sint argc, Char *argv[])
signal
(
SIGINT
,
signalHandlerSIGINT
);
{
// Init cJSON
cJSON_Hooks
hook
=
{.
malloc_fn
=
dl
malloc
,
.
free_fn
=
dl
free
};
cJSON_Hooks
hook
=
{.
malloc_fn
=
malloc
,
.
free_fn
=
free
};
cJSON_InitHooks
(
&
hook
);
}
...
...
@@ -89,7 +90,7 @@ Sint main (Sint argc, Char *argv[])
Command
*
commands
=
NULL
;
Grunt_Tracker
gt
=
{
0
};
Hash_Table
grunt_survey_map
=
htCreate
(
0
);
Hash_Table
grunt_survey_map
=
htCreate
();
Kafka
kafka
=
{
0
};
...
...
resource_system/src/arbiter/grunt_manager.c
View file @
194a118a
...
...
@@ -28,7 +28,7 @@ internal_function
void
gruntTrackBegin
(
Grunt_Tracker
*
t
,
Grunt
g
)
{
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
}
...
...
nlib
@
f71785e7
Subproject commit f71785e7c6a820e65c450d526c60519b250f3115
resource_system/src/common/nlib/nlib.h
0 → 100644
View file @
194a118a
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 @
194a118a
...
...
@@ -4,6 +4,7 @@
*/
#include "nlib/nlib.h"
#define stringEqual streq
#undef internal_malloc
#undef internal_free
...
...
@@ -115,14 +116,10 @@ int main(int argc, char** argv)
{
// Init third party libraries
{
// Init cJSON
cJSON_Hooks
hook
=
{.
malloc_fn
=
dl
malloc
,
.
free_fn
=
dl
free
};
cJSON_Hooks
hook
=
{.
malloc_fn
=
malloc
,
.
free_fn
=
free
};
cJSON_InitHooks
(
&
hook
);
}
{
// Init
prom_collector_registry_default_init
();
}
}
Configuration
conf
=
{
0
};
...
...
resource_system/src/grunt/thread_manager.c
View file @
194a118a
...
...
@@ -19,7 +19,7 @@ internal_function
void
threadTrackBegin
(
Thread_Tracker
*
t
,
Thread
th
)
{
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
}
...
...
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