Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aea1833

Browse filesBrowse files
committed
duh, wrong comments for MATLAB
1 parent 8a1df41 commit aea1833
Copy full SHA for aea1833

File tree

1 file changed

+15
-7
lines changed
Filter options

1 file changed

+15
-7
lines changed

‎stl/stl.m

Copy file name to clipboardExpand all lines: stl/stl.m
+15-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
classdef webserver < handle %#codegen
1+
classdef stl < handle %#codegen
22

33
methods(Static)
44

5-
// command line arguments
5+
% command line arguments
66
function ac = argc()
77
coder.cinclude('stl.h');
88

@@ -31,7 +31,7 @@
3131
end
3232
end
3333

34-
// thread
34+
% thread
3535
function tid = launch(name, arg)
3636
coder.cinclude('stl.h');
3737

@@ -66,12 +66,12 @@ function sleep(t)
6666
id = coder.ceval('stl_thread_self'); % evaluate the C function
6767
end
6868

69-
// mutex
69+
% mutex
7070
function mutex(name)
7171
coder.ceval('stl_launch', [name 0]); % evaluate the C function
7272
end
7373

74-
// semaphore
74+
% semaphore
7575
function sid = semaphore(name)
7676
coder.cinclude('stl.h');
7777

@@ -94,8 +94,16 @@ function semwait(id, wait)
9494
coder.ceval('stl_sem_wait', id, wait); % evaluate the C function
9595
end
9696

97-
// logging
98-
function stllog(varargin)
97+
% timer
98+
function tmid = timer(name, interval, semid)
99+
coder.cinclude('stl.h');
100+
101+
tmid = int32(0);
102+
tmid = coder.ceval('stl_timer_create', cstring(name), interval, semid); % evaluate the C function
103+
end
104+
105+
% logging
106+
function log(varargin)
99107
%stl.log Send formatted string to log
100108
%
101109
% stl.log(fmt, args...) has printf() like semantics and sends the formatted

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.