Skip to content

Commit

Permalink
Remove some unused external C code
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Apr 15, 2016
1 parent cfcd347 commit 4ed2f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Compiler/Util/System.mo
Expand Up @@ -635,7 +635,8 @@ end getHasInnerOuterDefinitions;
public function tmpTick
"returns a tick that can be reset"
output Integer tickNo;
external "C" tickNo = SystemImpl_tmpTick(OpenModelica.threadData()) annotation(Library = "omcruntime");
algorithm
tickNo := tmpTickIndex(index=0);
end tmpTick;

public function tmpTickReset
Expand Down
10 changes: 2 additions & 8 deletions Compiler/runtime/systemimpl.c
Expand Up @@ -2181,11 +2181,13 @@ extern int SystemImpl_tmpTickMaximum(threadData_t *threadData, int index)
return data->tmp_tick_max_no[index];
}

#if defined(OPENMODELICA_BOOTSTRAPPING_STAGE_1)
extern int SystemImpl_tmpTick(threadData_t *threadData)
{
int res = SystemImpl_tmpTickIndex(threadData,0);
return res;
}
#endif

extern void SystemImpl_tmpTickReset(threadData_t *threadData, int start)
{
Expand Down Expand Up @@ -2296,14 +2298,6 @@ double SystemImpl__realRand(void)
return tinymt64_generate_double(&system_random_seed);
}

/* Returns an integer (0,n] (i.e. the highest value is n-1)
* TODO: Remove once we update the bootstrapping tarball
*/
int SystemImpl__intRand(int n)
{
return (int) SystemImpl__realRand()*n;
}

/* Returns an integer [0,n) using the C function rand() */
int SystemImpl__intRandom(int n)
{
Expand Down

0 comments on commit 4ed2f2b

Please sign in to comment.