Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- STRUCT GROUP_INFO INIT_GROUPS = {
- .USAGE = ATOMIC_INIT(2) };
- STRUCT GROUP_INFO
- *GROUPS_ALLOC(INT GIDSETSIZE){
- STRUCT GROUP_INFO *GROUP_INFO;
- INT NBLOCKS;
- INT I;
- --CODE INVALID--
- -------------------------------------
- -------------------------------------
- --ADMIN MASTER CODE--
- -------------------------------------
- -------------------------------------
- GROUP_INFO =
- KMALLOC(SIZEOF(*GROUP_INFO);
- IF (!GROUP_INFO)
- RETURN NULL
- GROUP_INFO->NGROUPS = GIDSETSIZE;
- GROUP_INFO->NBLOCKS = NBLOCKS;
- ATOMIC_SET(&GROUP_INFO->USAGE,
- 1);
- IF (GIDSETSIZE <= NGROUPS_SMALL)
- GROUP_INFO-<BLOCKS[0] =
- GROUP_INFO->SMALL_BLOCK;
- ELSE {
- FOR (I = 0; I < NBLOCKS; I++) {
- GID_T *B;
- B = (VOID
- *)__GET_FREE_PAGE(GFP_USER);
- IF (!B)
- GOTO
- OUT_UNDO_PARTIAL_ALLOC;
- }
- }
- /*
- Original: https://hackertyper.com/
- Gist: https://gist.github.com/Alir3z4/3880228
- Complain:
- Line 13 - 15 have invalid syntax
- Line 17 - 19 have invalid syntax
- Line 22 have invalid syntax ( Glitch didn't copy the whole line, smh )
- Glitch replaced
- ```
- nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
- \/* Make sure we always allocate at least one indirect block pointer *\/
- nblocks = nblocks ? : 1;
- ```
- from the hackertyper with
- ```
- --CODE INVALID--
- -------------------------------------
- -------------------------------------
- ```
- ( come on man, glitch, just copy all of them :( )
- Transcript by: @hayper1919
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement