History

apopros functions and apis

gewang committed 5 years ago

Commit 449ef401 parent 9967a047 files · +312 −76Browse files

Showing the changes to src/core/ulib_machine.cpp (1 of 7 files). Show all

Unified · Split

src/core/ulib_machine.cpp+10−4
@@ -70,6 +70,7 @@ DLL_QUERY machine_query( Chuck_DL_Query * QUERY ) · 69 unmodified lines
7070 //! returns the shred ID
7171 //! (see example/machine.ck)
7272 QUERY->add_sfun( QUERY, machine_add_impl, "int", "add" );
73+ QUERY->doc_func( QUERY, "add/run a new shred from file at 'path'." );
7374 QUERY->add_arg( QUERY, "string", "path" );
7475
7576 // add spork
@@ -80,32 +81,37 @@ DLL_QUERY machine_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines
8081 // add remove
8182 //! remove shred from VM by shred ID (returned by add/spork)
8283 QUERY->add_sfun( QUERY, machine_remove_impl, "int", "remove" );
84+ QUERY->doc_func( QUERY, "remove a running shred by 'id'." );
8385 QUERY->add_arg( QUERY, "int", "id" );
8486
8587 // add replace
8688 //! replace shred with new shred from file
8789 //! returns shred ID , or 0 on error
8890 QUERY->add_sfun( QUERY, machine_replace_impl, "int", "replace" );
91+ QUERY->doc_func( QUERY, "replace running shred by 'id' with new shred at 'path'." );
8992 QUERY->add_arg( QUERY, "int", "id" );
9093 QUERY->add_arg( QUERY, "string", "path" );
9194
92− // add replace
93− //! replace shred with new shred from file
94− //! returns shred ID , or 0 on error
95+ // add crash
96+ //! explicitly crash the virtual machine
9597 QUERY->add_sfun( QUERY, machine_crash_impl, "void", "crash" );
98+ QUERY->doc_func( QUERY, "explicitly crash the virtual machine." );
9699
97100 // add status
98101 //! display current status of VM
99102 //! (see example/status.ck)
100103 QUERY->add_sfun( QUERY, machine_status_impl, "int", "status" );
101−
104+ QUERY->doc_func( QUERY, "display current status of virtual machine." );
105+
102106 // add get intsize (width)
103107 //! get the intsize in bits (e.g., 32 or 64)
104108 QUERY->add_sfun( QUERY, machine_intsize_impl, "int", "intsize" );
109+ QUERY->doc_func( QUERY, "get size of int in bits (e.g., 32 or 64)." );
105110
106111 // add shreds
107112 //! get list of active shreds by id
108113 QUERY->add_sfun( QUERY, machine_shreds_impl, "int[]", "shreds" );
114+ QUERY->doc_func( QUERY, "get list of active shred ids." );
109115
110116 // end class
111117 QUERY->end_class( QUERY );

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t