Mac OS X x86 assembler support.
[openssl.git] / crypto / engine / eng_table.c
index 0c1656168d50d60ed45a8bfdd6889eb4e089f6f4..3e892c8a621d62a9658fce4fb35eb3b0fc52ce6f 100644 (file)
@@ -76,6 +76,14 @@ struct st_engine_table
        LHASH piles;
        }; /* ENGINE_TABLE */
 
+
+typedef struct st_engine_pile_doall
+       {
+       engine_table_doall_cb *cb;
+       void *arg;
+       } ENGINE_PILE_DOALL;
+       
+
 /* Global flags (ENGINE_TABLE_FLAG_***). */
 static unsigned int table_flags = 0;
 
@@ -313,3 +321,21 @@ end:
        ERR_clear_error();
        return ret;
        }
+
+/* Table enumeration */
+
+static void int_doall_cb(ENGINE_PILE *pile, ENGINE_PILE_DOALL *dall)
+       {
+       dall->cb(pile->nid, pile->sk, pile->funct, dall->arg);
+       }
+
+static IMPLEMENT_LHASH_DOALL_ARG_FN(int_doall_cb,ENGINE_PILE *,ENGINE_PILE_DOALL *)
+void engine_table_doall(ENGINE_TABLE *table, engine_table_doall_cb *cb,
+                                                               void *arg)
+       {
+       ENGINE_PILE_DOALL dall;
+       dall.cb = cb;
+       dall.arg = arg;
+       lh_doall_arg(&table->piles,
+                       LHASH_DOALL_ARG_FN(int_doall_cb), &dall);
+       }