Permalink
Browse files

_ACQUIRE removed

  • Loading branch information...
x86-64 committed May 18, 2012
1 parent d008440 commit 86085984999a82e11b5560794164e38d75a3df16
View
@@ -1,28 +0,0 @@
-{ class => "daemon/thread" },
-{ class => "request/emitter",
- request = {
- request = {
- temp = (ref_t){
- data = (raw_t){ buffer = "Hello, world! (If seen twice - everything is fine)\n" }
- }
- },
- machine = (machine_t){
- { class = "query", data = (env_t)"temp", request = {
- action = (action_t)"acquire"
- }},
- { class = "query", data = (fd_t)"stdout", request = {
- action = (action_t)"write",
- buffer = (env_t)"temp"
- }},
- { class = "query", data = (env_t)"temp", request = {
- action = (action_t)"free"
- }},
- { class = "query", data = (fd_t)"stdout", request = {
- action = (action_t)"write",
- buffer = (env_t)"temp"
- }},
- { class = "end" }
- }
- }
-},
-{ class => "daemon/kill" }
View
@@ -243,18 +243,6 @@ ssize_t action_free_from_hash(data_t *data, request_t *request){ // {{{
return data_query(data, &fargs);
} // }}}
-ssize_t action_acquire_from_fast(machine_t *machine, fastcall_acquire *fargs){ // {{{
- request_t r_next[] = {
- { HK(action), DATA_PTR_ACTIONT( &fargs->header.action ) },
- hash_end
- };
- return machine_query(machine, r_next);
-} // }}}
-ssize_t action_acquire_from_hash(data_t *data, request_t *request){ // {{{
- fastcall_acquire fargs = { { 2, ACTION_ACQUIRE } };
- return data_query(data, &fargs);
-} // }}}
-
ssize_t action_increment_from_fast(machine_t *machine, fastcall_increment *fargs){ // {{{
request_t r_next[] = {
{ HK(action), DATA_PTR_ACTIONT( &fargs->header.action ) },
@@ -470,7 +458,6 @@ uintmax_t fastcall_nargs[ACTION_INVALID] = {
[ACTION_QUERY] = 3,
[ACTION_CONVERT_TO] = 4,
[ACTION_CONVERT_FROM] = 4,
- [ACTION_ACQUIRE] = 2,
[ACTION_COMPARE] = 3,
[ACTION_ADD] = 3,
@@ -499,7 +486,6 @@ f_machine_from_fast api_machine_from_fast[ACTION_INVALID] = {
[ACTION_QUERY] = (f_machine_from_fast)&action_query_from_fast,
[ACTION_CONVERT_TO] = (f_machine_from_fast)&action_convert_to_from_fast,
[ACTION_CONVERT_FROM] = (f_machine_from_fast)&action_convert_from_from_fast,
- [ACTION_ACQUIRE] = (f_machine_from_fast)&action_acquire_from_fast,
};
f_data_from_hash api_data_from_hash[ACTION_INVALID] = {
@@ -520,6 +506,5 @@ f_data_from_hash api_data_from_hash[ACTION_INVALID] = {
[ACTION_QUERY] = (f_data_from_hash)&action_query_from_hash,
[ACTION_CONVERT_TO] = (f_data_from_hash)&action_convert_to_from_hash,
[ACTION_CONVERT_FROM] = (f_data_from_hash)&action_convert_from_from_hash,
- [ACTION_ACQUIRE] = (f_data_from_hash)&action_acquire_from_hash,
};
View
@@ -110,8 +110,6 @@ typedef struct fastcall_header {
/*
// Various
ACTION(QUERY),
-
- ACTION(ACQUIRE)
*/
// Core api set {{{
@@ -468,10 +466,6 @@ typedef struct fastcall_view { // ACTION(VIEW)
} fastcall_view;
// }}}
-typedef struct fastcall_acquire {
- fastcall_header header;
-} fastcall_acquire;
-
typedef struct fastcall_query {
fastcall_header header;
request_t *request;
@@ -2,36 +2,34 @@
#ifndef ACTIONS_H
#define ACTIONS_H
#define ACT ION(value) ACTION_VALUE_##value
-#define ACTION_VALUE_ACQUIRE 0
-#define ACTION_VALUE_ADD 1
-#define ACTION_VALUE_BATCH 2
-#define ACTION_VALUE_COMPARE 3
-#define ACTION_VALUE_CONSUME 4
-#define ACTION_VALUE_CONTROL 5
-#define ACTION_VALUE_CONVERT_FROM 6
-#define ACTION_VALUE_CONVERT_TO 7
-#define ACTION_VALUE_CREATE 8
-#define ACTION_VALUE_DECREMENT 9
-#define ACTION_VALUE_DELETE 10
-#define ACTION_VALUE_DIVIDE 11
-#define ACTION_VALUE_ENUM 12
-#define ACTION_VALUE_FREE 13
-#define ACTION_VALUE_INCREMENT 14
-#define ACTION_VALUE_IS_NULL 15
-#define ACTION_VALUE_LENGTH 16
-#define ACTION_VALUE_LOOKUP 17
-#define ACTION_VALUE_MULTIPLY 18
-#define ACTION_VALUE_POP 19
-#define ACTION_VALUE_PUSH 20
-#define ACTION_VALUE_QUERY 21
-#define ACTION_VALUE_READ 22
-#define ACTION_VALUE_RESIZE 23
-#define ACTION_VALUE_SUB 24
-#define ACTION_VALUE_UPDATE 25
-#define ACTION_VALUE_VIEW 26
-#define ACTION_VALUE_WRITE 27
+#define ACTION_VALUE_ADD 0
+#define ACTION_VALUE_BATCH 1
+#define ACTION_VALUE_COMPARE 2
+#define ACTION_VALUE_CONSUME 3
+#define ACTION_VALUE_CONTROL 4
+#define ACTION_VALUE_CONVERT_FROM 5
+#define ACTION_VALUE_CONVERT_TO 6
+#define ACTION_VALUE_CREATE 7
+#define ACTION_VALUE_DECREMENT 8
+#define ACTION_VALUE_DELETE 9
+#define ACTION_VALUE_DIVIDE 10
+#define ACTION_VALUE_ENUM 11
+#define ACTION_VALUE_FREE 12
+#define ACTION_VALUE_INCREMENT 13
+#define ACTION_VALUE_IS_NULL 14
+#define ACTION_VALUE_LENGTH 15
+#define ACTION_VALUE_LOOKUP 16
+#define ACTION_VALUE_MULTIPLY 17
+#define ACTION_VALUE_POP 18
+#define ACTION_VALUE_PUSH 19
+#define ACTION_VALUE_QUERY 20
+#define ACTION_VALUE_READ 21
+#define ACTION_VALUE_RESIZE 22
+#define ACTION_VALUE_SUB 23
+#define ACTION_VALUE_UPDATE 24
+#define ACTION_VALUE_VIEW 25
+#define ACTION_VALUE_WRITE 26
typedef enum action_t {
- ACTION_ACQUIRE = ACTION_VALUE_ACQUIRE,
ACTION_ADD = ACTION_VALUE_ADD,
ACTION_BATCH = ACTION_VALUE_BATCH,
ACTION_COMPARE = ACTION_VALUE_COMPARE,
@@ -59,13 +57,12 @@ typedef enum action_t {
ACTION_UPDATE = ACTION_VALUE_UPDATE,
ACTION_VIEW = ACTION_VALUE_VIEW,
ACTION_WRITE = ACTION_VALUE_WRITE,
- ACTION_INVALID = 28
+ ACTION_INVALID = 27
} action_t;
#endif
#ifdef ACTION_C
keypair_t actions[] = {
- { "ACQUIRE", ACTION_VALUE_ACQUIRE },
{ "ADD", ACTION_VALUE_ADD },
{ "BATCH", ACTION_VALUE_BATCH },
{ "COMPARE", ACTION_VALUE_COMPARE },
@@ -70,12 +70,6 @@ static ssize_t data_ref_t_free(data_t *data, fastcall_free *hargs){ // {{{
ref_t_destroy(fdata);
return 0;
} // }}}
-static ssize_t data_ref_t_acquire(data_t *data, fastcall_acquire *hargs){ // {{{
- ref_t *fdata = (ref_t *)data->ptr;
-
- ref_t_acquire(fdata);
- return 0;
-} // }}}
static ssize_t data_ref_t_control(data_t *data, fastcall_control *fargs){ // {{{
ref_t *fdata = (ref_t *)data->ptr;
@@ -101,7 +95,6 @@ data_proto_t ref_t_proto = {
.handlers = {
[ACTION_CONVERT_FROM] = (f_data_func)&data_ref_t_convert_from,
[ACTION_FREE] = (f_data_func)&data_ref_t_free,
- [ACTION_ACQUIRE] = (f_data_func)&data_ref_t_acquire,
[ACTION_CONTROL] = (f_data_func)&data_ref_t_control,
}
};
@@ -1,2 +0,0 @@
-Hello, world! (If seen twice - everything is fine)
-Hello, world! (If seen twice - everything is fine)

0 comments on commit 8608598

Please sign in to comment.