howm
howm
scratchpad.h
Go to the documentation of this file.
1 #ifndef SCRATCHPAD_H
2 #define SCRATCHPAD_H
3 
4 #include "types.h"
5 
31 struct stack {
32  unsigned int size;
35 };
36 
37 extern struct stack del_reg;
38 
39 void stack_push(struct stack *s, client_t *c);
40 client_t *stack_pop(struct stack *s);
41 void stack_init(struct stack *s);
42 void stack_free(struct stack *s);
43 void send_to_scratchpad(void);
44 void get_from_scratchpad(void);
45 
46 #endif
struct stack del_reg
Definition: scratchpad.c:21
howm
void get_from_scratchpad(void)
Get a client from the scratchpad, attach it as the last item in the client list and set it to float...
Definition: scratchpad.c:127
unsigned int size
Definition: scratchpad.h:32
client_t ** contents
Definition: scratchpad.h:33
void stack_free(struct stack *s)
Free the allocated contents.
Definition: scratchpad.c:46
client_t * stack_pop(struct stack *s)
Remove the top item from the stack and return it.
Definition: scratchpad.c:78
Definition: types.h:25
Represents a stack. This stack is going to hold linked lists of clients. An example of the stack is b...
Definition: scratchpad.h:31
void stack_init(struct stack *s)
Dynamically allocate space for the contents of the stack.
Definition: scratchpad.c:32
void stack_push(struct stack *s, client_t *c)
Pushes a client onto the stack, as long as it isn't full.
Definition: scratchpad.c:59
void send_to_scratchpad(void)
Send a client to the scratchpad and unmap it.
Definition: scratchpad.c:94