summaryrefslogtreecommitdiffstats
path: root/ProcessLocksScreen.h
blob: 417df7b20a17f300ee0893eea2d7479e052b97aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef HEADER_ProcessLocksScreen
#define HEADER_ProcessLocksScreen
/*
htop - ProcessLocksScreen.h
(C) 2020 htop dev team
Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/

#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>

#include "InfoScreen.h"
#include "Object.h"
#include "Process.h"


typedef struct ProcessLocksScreen_ {
   InfoScreen super;
   pid_t pid;
} ProcessLocksScreen;

typedef struct FileLocks_Data_ {
   char* locktype;
   char* exclusive;
   char* readwrite;
   char* filename;
   int fd;
   dev_t dev;
   uint64_t inode;
   uint64_t start;
   uint64_t end;
} FileLocks_Data;

typedef struct FileLocks_LockData_ {
   FileLocks_Data data;
   struct FileLocks_LockData_* next;
} FileLocks_LockData;

typedef struct FileLocks_ProcessData_ {
   bool error;
   struct FileLocks_LockData_* locks;
} FileLocks_ProcessData;

extern const InfoScreenClass ProcessLocksScreen_class;

ProcessLocksScreen* ProcessLocksScreen_new(const Process* process);

void ProcessLocksScreen_delete(Object* this);

#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy