Showing the changes to src/core/ulib_machine.cpp (1 of 7 files). Show all
Unified · Split
| @@ -70,6 +70,7 @@ DLL_QUERY machine_query( Chuck_DL_Query * QUERY ) · 69 unmodified lines | ||
| 70 | 70 | //! returns the shred ID |
| 71 | 71 | //! (see example/machine.ck) |
| 72 | 72 | QUERY->add_sfun( QUERY, machine_add_impl, "int", "add" ); |
| 73 | + QUERY->doc_func( QUERY, "add/run a new shred from file at 'path'." ); | |
| 73 | 74 | QUERY->add_arg( QUERY, "string", "path" ); |
| 74 | 75 | |
| 75 | 76 | // add spork |
| @@ -80,32 +81,37 @@ DLL_QUERY machine_query( Chuck_DL_Query * QUERY ) · 4 unmodified lines | ||
| 80 | 81 | // add remove |
| 81 | 82 | //! remove shred from VM by shred ID (returned by add/spork) |
| 82 | 83 | QUERY->add_sfun( QUERY, machine_remove_impl, "int", "remove" ); |
| 84 | + QUERY->doc_func( QUERY, "remove a running shred by 'id'." ); | |
| 83 | 85 | QUERY->add_arg( QUERY, "int", "id" ); |
| 84 | 86 | |
| 85 | 87 | // add replace |
| 86 | 88 | //! replace shred with new shred from file |
| 87 | 89 | //! returns shred ID , or 0 on error |
| 88 | 90 | QUERY->add_sfun( QUERY, machine_replace_impl, "int", "replace" ); |
| 91 | + QUERY->doc_func( QUERY, "replace running shred by 'id' with new shred at 'path'." ); | |
| 89 | 92 | QUERY->add_arg( QUERY, "int", "id" ); |
| 90 | 93 | QUERY->add_arg( QUERY, "string", "path" ); |
| 91 | 94 | |
| 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 | |
| 95 | 97 | QUERY->add_sfun( QUERY, machine_crash_impl, "void", "crash" ); |
| 98 | + QUERY->doc_func( QUERY, "explicitly crash the virtual machine." ); | |
| 96 | 99 | |
| 97 | 100 | // add status |
| 98 | 101 | //! display current status of VM |
| 99 | 102 | //! (see example/status.ck) |
| 100 | 103 | QUERY->add_sfun( QUERY, machine_status_impl, "int", "status" ); |
| 101 | − | |
| 104 | + QUERY->doc_func( QUERY, "display current status of virtual machine." ); | |
| 105 | + | |
| 102 | 106 | // add get intsize (width) |
| 103 | 107 | //! get the intsize in bits (e.g., 32 or 64) |
| 104 | 108 | 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)." ); | |
| 105 | 110 | |
| 106 | 111 | // add shreds |
| 107 | 112 | //! get list of active shreds by id |
| 108 | 113 | QUERY->add_sfun( QUERY, machine_shreds_impl, "int[]", "shreds" ); |
| 114 | + QUERY->doc_func( QUERY, "get list of active shred ids." ); | |
| 109 | 115 | |
| 110 | 116 | // end class |
| 111 | 117 | QUERY->end_class( QUERY ); |