File: sockfd_cache.h

package info (click to toggle)
sheepdog 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,364 kB
  • ctags: 3,951
  • sloc: ansic: 30,552; sh: 3,573; perl: 2,924; asm: 453; makefile: 391; python: 192
file content (22 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef SOCKFD_CACHE_H
#define SOCKFD_CACHE_H

#include "internal_proto.h"
#include "work.h"

struct sockfd *sockfd_cache_get(const struct node_id *nid);
void sockfd_cache_put(const struct node_id *nid, struct sockfd *sfd);
void sockfd_cache_del_node(const struct node_id *nid);
void sockfd_cache_del(const struct node_id *nid, struct sockfd *sfd);
void sockfd_cache_add(const struct node_id *nid);
void sockfd_cache_add_group(const struct rb_root *nroot);

int sockfd_init(void);

/* sockfd_cache */
struct sockfd {
	int fd;
	int idx;
};

#endif	/* SOCKFD_CACHE_H */