* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <common/bitfield.h>
#include <common/common.h>
#include <common/kernel-ctl/kernel-ctl.h>
}
while (fscanf(fp,
- "syscall { index = %lu; \
+ "syscall { index = %zu; \
name = %" XSTR(SYSCALL_NAME_LEN) "[^;]; \
bitness = %u; };\n",
&index, name, &bitness) == 3) {
events = new_events;
}
+ rcu_read_lock();
ksyscall = lookup_syscall(syscalls_ht, syscall_table[i].name);
if (ksyscall) {
update_event_syscall_bitness(events, i, ksyscall->index);
+ rcu_read_unlock();
continue;
}
+ ksyscall = NULL;
+ rcu_read_unlock();
ret = add_syscall_to_ht(syscalls_ht, i, count);
if (ret < 0) {
strncpy(events[count].name, syscall_table[i].name,
sizeof(events[count].name));
events[count].enabled = 1;
- events[count].type = LTTNG_KERNEL_SYSCALL;
+ events[count].type = LTTNG_EVENT_SYSCALL;
count++;
}
return count;
error:
+ rcu_read_lock();
destroy_syscall_ht(syscalls_ht);
+ rcu_read_unlock();
+
free(events);
return ret;
}