-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: set globals only in funcs that need it
- Loading branch information
1 parent
774e9bf
commit 5f299fc
Showing
10 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/// @file | ||
|
||
#include "pkg/noun/v3/hashtable.h" | ||
|
||
#include "pkg/noun/allocate.h" | ||
#include "pkg/noun/vortex.h" | ||
|
||
#include "pkg/noun/v3/allocate.h" | ||
#include "pkg/noun/v3/vortex.h" | ||
|
||
/* u3h_v3_new_cache(): create hashtable with bounded size. | ||
*/ | ||
u3p(u3h_v3_root) | ||
u3h_v3_new_cache(c3_w max_w) | ||
{ | ||
// set globals (required for aliased functions) | ||
u3H = (u3v_home*) u3H_v3; | ||
u3R = (u3a_road*) u3R_v3; | ||
|
||
u3h_v3_root* har_u = u3a_v3_walloc(c3_wiseof(u3h_v3_root)); | ||
u3p(u3h_v3_root) har_p = u3of(u3h_v3_root, har_u); | ||
c3_w i_w; | ||
|
||
har_u->max_w = max_w; | ||
har_u->use_w = 0; | ||
har_u->arm_u.mug_w = 0; | ||
har_u->arm_u.inx_w = 0; | ||
|
||
for ( i_w = 0; i_w < 64; i_w++ ) { | ||
har_u->sot_w[i_w] = 0; | ||
} | ||
return har_p; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
#ifndef U3_HASHTABLE_V3_H | ||
#define U3_HASHTABLE_V3_H | ||
|
||
#define u3h_v3_new_cache u3h_new_cache | ||
#define u3h_v3_free u3h_free | ||
#define u3h_v3_new u3h_new | ||
#define u3h_v3_root u3h_root | ||
#define u3h_v3_walk u3h_walk | ||
|
||
#include "pkg/noun/hashtable.h" | ||
|
||
/** Functions. | ||
**/ | ||
/* u3h_v3_new_cache(): create hashtable with bounded size. | ||
*/ | ||
u3p(u3h_v3_root) | ||
u3h_v3_new_cache(c3_w clk_w); | ||
|
||
#endif /* U3_HASHTABLE_V3_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// @file | ||
|
||
#ifndef U3_JETS_V3_H | ||
#define U3_JETS_V3_H | ||
|
||
#include "pkg/noun/jets.h" | ||
|
||
/** Aliases. | ||
**/ | ||
# define u3j_v3_free_hank u3j_free_hank | ||
|
||
#endif /* ifndef U3_JETS_V3_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters