mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
nodejs and python helper symlinks
This commit is contained in:
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -30,6 +30,12 @@
|
||||
[submodule "submodules/linux"]
|
||||
path = submodules/linux
|
||||
url = https://github.com/cirosantilli/linux
|
||||
[submodule "submodules/lmbench"]
|
||||
path = submodules/lmbench
|
||||
url = https://github.com/cirosantilli/lmbench
|
||||
[submodule "submodules/omp-validation"]
|
||||
path = submodules/omp-validation
|
||||
url = https://github.com/cirosantilli/omp-validation
|
||||
[submodule "submodules/parsec-benchmark"]
|
||||
path = submodules/parsec-benchmark
|
||||
url = https://github.com/cirosantilli/parsec-benchmark
|
||||
@@ -42,6 +48,3 @@
|
||||
[submodule "submodules/stream-benchmark"]
|
||||
path = submodules/stream-benchmark
|
||||
url = https://github.com/cirosantilli/stream-benchmark
|
||||
[submodule "submodules/omp-validation"]
|
||||
path = submodules/omp-validation
|
||||
url = https://github.com/cirosantilli/omp-validation
|
||||
|
||||
@@ -18147,7 +18147,7 @@ Aborted (core dumped)
|
||||
|
||||
Get the failing command with:
|
||||
|
||||
,,..
|
||||
....
|
||||
make VERBOSE=1 model-armv8
|
||||
....
|
||||
|
||||
@@ -19718,6 +19718,8 @@ Examples:
|
||||
* `fs`
|
||||
** link:rootfs_overlay/lkmc/nodejs/file_write_read.js[]
|
||||
** link:rootfs_overlay/lkmc/nodejs/read_stdin_to_string.js[] Question: https://stackoverflow.com/questions/30441025/read-all-text-from-stdin-to-a-string
|
||||
* `class`
|
||||
** link:rootfs_overlay/lkmc/nodejs/object_to_string.js[]: `util.inspect.custom` and `toString` override experiment: https://stackoverflow.com/questions/24902061/is-there-an-repr-equivalent-for-javascript/26698403#26698403
|
||||
|
||||
===== NPM
|
||||
|
||||
|
||||
36
rootfs_overlay/lkmc/nodejs/object_to_string.js
Executable file
36
rootfs_overlay/lkmc/nodejs/object_to_string.js
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// https://cirosantilli.com/linux-kernel-module-cheat#node-js
|
||||
|
||||
|
||||
const util = require('util');
|
||||
|
||||
class MyClassUtilInspectCustom {
|
||||
constructor(a, b) {
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
}
|
||||
[util.inspect.custom]() {
|
||||
return `my type is MyClassUtilInspectCustom and a is ${this.a} and b is ${this.b}`;
|
||||
}
|
||||
}
|
||||
|
||||
let my_object = new MyClassUtilInspectCustom(1, 2);
|
||||
console.log(util.inspect(my_object));
|
||||
console.log(my_object);
|
||||
console.log(my_object.toString());
|
||||
|
||||
class MyClassToString {
|
||||
constructor(a, b) {
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
}
|
||||
toString() {
|
||||
return `my type is MyClassToString and a is ${this.a} and b is ${this.b}`;
|
||||
}
|
||||
}
|
||||
|
||||
my_object = new MyClassToString(1, 2);
|
||||
console.log(util.inspect(my_object));
|
||||
console.log(my_object);
|
||||
console.log(my_object.toString());
|
||||
1
submodules/lmbench
Submodule
1
submodules/lmbench
Submodule
Submodule submodules/lmbench added at 5ddee65534
Reference in New Issue
Block a user