Skip to content

Commit 5d45e17

Browse files
committed
Add flags to the attach call for future use
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
1 parent cca496c commit 5d45e17

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/afu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,12 +654,14 @@ ocxl_err ocxl_afu_open(const char *name, ocxl_afu_h *afu)
654654
* @pre the AFU is opened
655655
*
656656
* @param afu the AFU to attach
657+
* @param flags An ORed bitmask of flags
658+
* OCXL_ATTACH_FLAGS_NONE accept the default behavior
657659
*
658660
* @retval OCXL_OK if the AFU was successful attached
659661
* @retval OCXL_NO_CONTEXT if the AFU was not opened
660662
* @retval OCXL_INTERNAL_ERROR if the AFU was unable to attach (check dmesg)
661663
*/
662-
ocxl_err ocxl_afu_attach(ocxl_afu_h afu)
664+
ocxl_err ocxl_afu_attach(ocxl_afu_h afu, uint64_t flags)
663665
{
664666
ocxl_afu *my_afu = (ocxl_afu *) afu;
665667

src/include/libocxl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ typedef struct ocxl_event {
141141
};
142142
} ocxl_event;
143143

144+
#define OCXL_ATTACH_FLAGS_NONE (0)
145+
144146
/* setup.c */
145147
void ocxl_enable_messages(uint64_t sources);
146148
void ocxl_set_error_message_handler(void (*handler)(ocxl_err error, const char *message));
@@ -162,7 +164,7 @@ void ocxl_afu_enable_messages(ocxl_afu_h afu, uint64_t sources);
162164
void ocxl_afu_set_error_message_handler(ocxl_afu_h afu, void (*handler)(ocxl_afu_h afu, ocxl_err error,
163165
const char *message));
164166
ocxl_err ocxl_afu_close(ocxl_afu_h afu);
165-
ocxl_err ocxl_afu_attach(ocxl_afu_h afu);
167+
ocxl_err ocxl_afu_attach(ocxl_afu_h afu, uint64_t flags);
166168

167169
/* irq.c */
168170
/* AFU IRQ functions */

0 commit comments

Comments
 (0)