How Fuse-1.3 Works [Written by Terje Oseberg] 1. The fuse library. When your user mode program calls fuse_main() (lib/helper.c), fuse_main() parses the arguments passed to your user mode program, then calls fuse_mount() (lib/mount.c). fuse_mount() creates a UNIX domain socket pair, then forks and execs fusermount (util/fusermount.c) passing it one end of the socket in the FUSE_COMMFD_ENV environment variable. fusermount (util/fusermount.c) makes sure that the fuse module is loaded. fusermount then open /dev/fuse and send the file handle over a UNIX domain socket back to fuse_mount(). fuse_mount() returns the filehandle for /dev/fuse to fuse_main(). fuse_main() calls fuse_new() (lib/fuse.c) which allocates the struct fuse datastructure that stores and maintains a cached image of the filesystem data. Lastly, fuse_main() calls either fuse_loop() (lib/fuse.c) or fuse_loop_mt() (lib/fuse_mt.c) which both start to read the filesystem system calls from the /dev/fuse, call the usermode functions stored in struct fuse_operations datastructure before calling fuse_main(). The results of those calls are then written back to the /dev/fuse file where they can be forwarded back to the system calls. 2. The kernel module. The kernel module consists of two parts. First the proc filesystem component in kernel/dev.c -and second the filesystem system calls kernel/file.c, kernel/inode.c, and kernel/dir.c All the system calls in kernel/file.c, kernel/inode.c, and kernel/dir.c make calls to either request_send(), request_send_noreply(), or request_send_nonblock(). Most of the calls (all but 2) are to request_send(). request_send() adds the request to, "list of requests" structure (fc->pending), then waits for a response. request_send_noreply() and request_send_nonblock() are both similar in function to request_send() except that one is non-blocking, and the other does not respond with a reply. The proc filesystem component in kernel/dev.c responds to file io requests to the file /dev/fuse. fuse_dev_read() handles the file reads and returns commands from the "list of requests" structure to the calling program. fuse_dev_write() handles file writes and takes the data written and places them into the req->out datastructure where they can be returned to the system call through the "list of requests" structure and request_send(). n/javascript?id=8de6d3ff77e841a5fd9d5f1b16bdd22737c8d657'>treecommitdiffstats
path: root/extensions-builtin/canvas-zoom-and-pan/javascript
AgeCommit message (Expand)AuthorLines
2023-06-14Formatting code with PrettierDanil Boldyrev-75/+95
2023-06-14Reworked the disabling of functions, refactored part of the codeDanil Boldyrev-128/+113
2023-06-12remove console.logDanil Boldyrev-2/+0
2023-06-12Improved error output, improved settings menuDanil Boldyrev-35/+140
2023-06-05Zoom and Pan: simplify waitForOptsAarni Koskela-8/+6
2023-06-05Zoom and Pan: use for instead of forEachAarni Koskela-10/+7
2023-06-05Zoom and Pan: simplify getElements (it's not actually async)Aarni Koskela-10/+4
2023-06-05Zoom and Pan: use elementIDs from closure scopeAarni Koskela-18/+18
2023-06-05Zoom and Pan: move helpers into its namespace to avoid littering global scopeAarni Koskela-97/+95
2023-06-04Correct definition zoom levelDanil Boldyrev-13/+8
2023-06-04Fixed visual bugsDanil Boldyrev-6/+7
2023-06-04Made a function applyZoomAndPan isolated each instanceDanil Boldyrev-97/+113
2023-06-04Fixed the redmask bugDanil Boldyrev-1/+67
2023-06-03Made the applyZoomAndPan function global for other extensionsDanil Boldyrev-4/+15
2023-06-03small ui fixDanil Boldyrev-1/+1
2023-06-03Added the ability to swap the zoom hotkeys and resize the brushDanil Boldyrev-6/+17
2023-06-02Made tooltip optional.Danil Boldyrev-51/+71
2023-06-02Added a hotkey repeat check to avoid bugsDanil Boldyrev-7/+9
2023-06-02Added the ability to configure hotkeys via webuiDanil Boldyrev-21/+67
2023-05-31Fixed the problem with sticking to the mouse, created a tooltipDanil Boldyrev-7/+61
2023-05-30a small fix for very wide images, because of the scroll bar was the wrong zoomDanil Boldyrev-1/+4
2023-05-29Moved the script to the extension build-inDanil Boldyrev-0/+428