Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hal/Submakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
../include/hal.h: ./hal/hal.h
cp $^ $@

HALLIBSRCS := hal/hal_lib.c $(ULAPISRCS)
HALLIBSRCS := hal/hal_lib.c hal/hal_lib_extra.c $(ULAPISRCS)
$(call TOOBJSDEPS, $(HALLIBSRCS)): EXTRAFLAGS += -fPIC $(ULAPI_CFLAGS)
USERSRCS += $(HALLIBSRCS)
ifeq ($(BUILD_SYS),uspace)
Expand Down
30 changes: 30 additions & 0 deletions src/hal/hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,36 @@ static inline rtapi_s64 hal_extend_counter(rtapi_s64 old, rtapi_s64 newlow, int
return (rtapi_u64)old + (diff_shifted >> nshift); // unsigned to avoid signed overflow
}

// Only enable the query API when we are compiling the user-land HAL library
#ifdef ULAPI

//
// *** Special functions for rtapi_app and halcmd ***
//
// Invoke the constructor for a new instance
// Uspace/rtapi_app only. Not implemented in halcmd/halrmt.
int hal_comp_invoke_make(const char *compname, const char *newname, const char *arg);

// Add the insmod arguments to a named (and just loaded) RT component
// The 'args' argument must be in HAL memory.
int hal_comp_insmod_args(const char *compname, const char *args);

// -----------------------------------------------------
// Release the HAL mutex with brute force
// WARNING:
// * Do not use this function in normal code. You will
// * probably kill your running instance when you do.
// * It is only to recover from an error and you need
// * to be able to shut down your instance.
int hal_mutex_force_release(void);
// -----------------------------------------------------

// HAL will pretend that the exact base period requested is possible.
// This mode is not suitable for running real hardware.
// Returns zero (0) on success or a negative -EACCES error if already set.
int hal_enforce_exact_base_period(void);

#endif // ULAPI

RTAPI_END_DECLS

Expand Down
Loading
Loading