Kaydet (Commit) 0afdff44 authored tarafından S.Çağlar Onur's avatar S.Çağlar Onur

merged from staj-projeleri

üst c74c2cbf
......@@ -10,6 +10,7 @@
#ifndef ACL_H
#define ACL_H 1
//! A user id and group id only
struct Creds {
uid_t uid;
gid_t gid;
......
......@@ -12,6 +12,11 @@
#include "utility.h"
//! Database operations
/*!
All database related functions are here
*/
int db_init(void);
int db_put_script(int node_no, const char *app, const char *buffer, size_t size);
......
......@@ -16,27 +16,29 @@ extern int shutdown_activated;
struct ipc_source {
void *chan;
unsigned int cookie;
unsigned int cookie; /*!< To detect process */
int id;
unsigned char lang[4];
unsigned char lang[4]; /*!< Messages language */
};
//! A basic process structure
struct ProcChild {
int from;
int to;
pid_t pid;
const char *desc;
int from; /*!< FIXME. */
int to; /*!< FIXME. */
pid_t pid; /*!< Process id */
const char *desc; /*!< Description of process, also its name */
// keep track of command source, used by job_cancel
struct ipc_source source;
};
//! A Process
struct Proc {
// parent info
struct ProcChild parent;
const char *desc;
struct ProcChild parent; /*!< Parent of this process */
const char *desc; /*!< Name of this process */
// children info
int nr_children;
int max_children;
int nr_children; /*!< Number of children */
int max_children; /*!< Maximum children */
struct ProcChild *children;
};
......@@ -45,13 +47,12 @@ struct ipc_struct {
int node;
};
// per process global variable
extern struct Proc my_proc;
extern struct Proc my_proc; /*!< Per process global variable */
// for readability of send_cmd/data functions
//! For readability of send_cmd/data functions
#define TO_PARENT NULL
// ipc commands
//! ipc commands
enum {
CMD_FINISH = 0,
CMD_RESULT,
......
......@@ -19,11 +19,12 @@ int utf8_is_valid(const char *str, size_t size);
unsigned long time_diff(struct timeval *start, struct timeval *end);
//! A package struct
struct pack {
unsigned char *buffer;
size_t max;
size_t used;
unsigned int pos;
unsigned char *buffer; /*!< Buffer that carries data */
size_t max; /*!< Max size of data */
size_t used; /*!< Used size */
unsigned int pos; /*!< Position in data */
};
struct pack *pack_new(size_t min_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment