]> sigrok.org Git - libsigrok.git/log
libsigrok.git
12 years agofx2lafw: Ensure default sample rate is set
Joel Holdsworth [Sun, 4 Mar 2012 14:10:05 +0000 (14:10 +0000)]
fx2lafw: Ensure default sample rate is set

12 years agofx2lafw: Removed CMD_STOP and renumbered commands
Joel Holdsworth [Sat, 3 Mar 2012 18:09:29 +0000 (18:09 +0000)]
fx2lafw: Removed CMD_STOP and renumbered commands

12 years agofx2lafw: Moved num_samples into context struct
Joel Holdsworth [Sat, 3 Mar 2012 15:22:51 +0000 (15:22 +0000)]
fx2lafw: Moved num_samples into context struct

12 years agosaleae-logic: Moved num_samples into context struct
Joel Holdsworth [Sat, 3 Mar 2012 15:18:19 +0000 (15:18 +0000)]
saleae-logic: Moved num_samples into context struct

12 years agofx2lafw: Removed CMD_SET_SAMPLERATE
Joel Holdsworth [Sat, 3 Mar 2012 14:57:57 +0000 (14:57 +0000)]
fx2lafw: Removed CMD_SET_SAMPLERATE

12 years agofx2lafw: Implemented initial support for start capture
Joel Holdsworth [Thu, 1 Mar 2012 20:34:20 +0000 (20:34 +0000)]
fx2lafw: Implemented initial support for start capture

12 years agosr: Added device IDs for CWAV USBee AX to udev rules
Joel Holdsworth [Thu, 1 Mar 2012 19:47:47 +0000 (19:47 +0000)]
sr: Added device IDs for CWAV USBee AX to udev rules

12 years agofx2lafw: Devices now retain the same PID/VID after fw load
Joel Holdsworth [Thu, 1 Mar 2012 19:45:08 +0000 (19:45 +0000)]
fx2lafw: Devices now retain the same PID/VID after fw load

12 years agofx2lafw: Implemented SR_HWCAP_PROBECONFIG and SR_HWCAP_LIMIT_SAMPLES
Joel Holdsworth [Wed, 29 Feb 2012 22:47:05 +0000 (22:47 +0000)]
fx2lafw: Implemented SR_HWCAP_PROBECONFIG and SR_HWCAP_LIMIT_SAMPLES

12 years agofx2lafw: Fixed a compiler error, and made cv_data consistent with saleae-logic.c
Joel Holdsworth [Sun, 4 Mar 2012 14:34:16 +0000 (14:34 +0000)]
fx2lafw: Fixed a compiler error, and made cv_data consistent with saleae-logic.c

12 years agosr: Fix some TODOs, improve comments/docs.
Uwe Hermann [Sun, 4 Mar 2012 14:08:11 +0000 (15:08 +0100)]
sr: Fix some TODOs, improve comments/docs.

12 years agosr/srd: s/handler/callback/.
Uwe Hermann [Sat, 3 Mar 2012 13:13:21 +0000 (14:13 +0100)]
sr/srd: s/handler/callback/.

We should consistently use the same name for the same thing.

12 years agosr: More callback param renames.
Uwe Hermann [Sat, 3 Mar 2012 08:56:49 +0000 (09:56 +0100)]
sr: More callback param renames.

Start/stop acquisition callbacks: Consistently name the 'void *' parameter
cb_data for now. The per-device-instance device pointer is called
'session_dev_id' everywhere for now, but this should be renamed to
something more clear.

12 years agosr: Name all callback data 'cb_data'.
Uwe Hermann [Wed, 29 Feb 2012 21:32:34 +0000 (22:32 +0100)]
sr: Name all callback data 'cb_data'.

12 years agosr: s/sr_session_bus/sr_session_send/.
Uwe Hermann [Wed, 29 Feb 2012 21:08:45 +0000 (22:08 +0100)]
sr: s/sr_session_bus/sr_session_send/.

12 years agosr/srd: Consistency fixes for callbacks.
Uwe Hermann [Wed, 29 Feb 2012 20:56:24 +0000 (21:56 +0100)]
sr/srd: Consistency fixes for callbacks.

 - Callback function pointer typedefs end with _t.

 - Variables holding callback functions are named 'cb' everywhere.

12 years agosr/cli/gtk/qt: s/hw/driver/ in some places.
Uwe Hermann [Wed, 29 Feb 2012 18:56:15 +0000 (19:56 +0100)]
sr/cli/gtk/qt: s/hw/driver/ in some places.

12 years agosr: sr_hw_has_hwcap(): More docs, error checks.
Uwe Hermann [Wed, 29 Feb 2012 18:32:39 +0000 (19:32 +0100)]
sr: sr_hw_has_hwcap(): More docs, error checks.

12 years agosr: s/sr_dev_probe_name/sr_dev_probe_name_set/.
Uwe Hermann [Wed, 29 Feb 2012 18:17:36 +0000 (19:17 +0100)]
sr: s/sr_dev_probe_name/sr_dev_probe_name_set/.

12 years agosr: datastore: More error checks.
Uwe Hermann [Wed, 29 Feb 2012 18:11:09 +0000 (19:11 +0100)]
sr: datastore: More error checks.

12 years agosr: Rename hwplugin.c to hwdriver.c.
Uwe Hermann [Tue, 28 Feb 2012 22:53:17 +0000 (23:53 +0100)]
sr: Rename hwplugin.c to hwdriver.c.

12 years agosr/cli/gtk/qt/: s/plugin/driver/.
Uwe Hermann [Tue, 28 Feb 2012 22:52:30 +0000 (23:52 +0100)]
sr/cli/gtk/qt/: s/plugin/driver/.

12 years agosr: code cleanup
Bert Vermeulen [Tue, 28 Feb 2012 16:47:02 +0000 (17:47 +0100)]
sr: code cleanup

12 years agosr: Fix/document probe names.
Uwe Hermann [Tue, 28 Feb 2012 00:09:29 +0000 (01:09 +0100)]
sr: Fix/document probe names.

12 years agosr: fx2lafw: Consistent #include guard naming.
Uwe Hermann [Mon, 27 Feb 2012 22:55:06 +0000 (23:55 +0100)]
sr: fx2lafw: Consistent #include guard naming.

12 years agosr: fx2lafw: Use gboolean consistenly.
Uwe Hermann [Mon, 27 Feb 2012 22:53:44 +0000 (23:53 +0100)]
sr: fx2lafw: Use gboolean consistenly.

12 years agofx2lafw: Small consistency fixes.
Uwe Hermann [Mon, 27 Feb 2012 22:40:38 +0000 (23:40 +0100)]
fx2lafw: Small consistency fixes.

12 years agofx2lafw: Compile fix.
Uwe Hermann [Mon, 27 Feb 2012 22:26:05 +0000 (23:26 +0100)]
fx2lafw: Compile fix.

12 years agofx2lafw: Implemented hw_dev_acquisition_stop
Joel Holdsworth [Mon, 27 Feb 2012 19:34:24 +0000 (19:34 +0000)]
fx2lafw: Implemented hw_dev_acquisition_stop

12 years agofx2lafw: Implemented hw_dev_acquisition_start
Joel Holdsworth [Mon, 27 Feb 2012 19:32:58 +0000 (19:32 +0000)]
fx2lafw: Implemented hw_dev_acquisition_start

12 years agofx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES
Joel Holdsworth [Mon, 27 Feb 2012 19:21:08 +0000 (19:21 +0000)]
fx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES

12 years agofx2lafw: Added more to hw_cleanup
Joel Holdsworth [Mon, 27 Feb 2012 19:02:52 +0000 (19:02 +0000)]
fx2lafw: Added more to hw_cleanup

12 years agofx2lafw: Implemented hw_dev_close
Joel Holdsworth [Mon, 27 Feb 2012 19:00:22 +0000 (19:00 +0000)]
fx2lafw: Implemented hw_dev_close

12 years agofx2lafw: Implemented hw_dev_open
Joel Holdsworth [Sun, 26 Feb 2012 12:39:40 +0000 (12:39 +0000)]
fx2lafw: Implemented hw_dev_open

12 years agosr: Moved GTV_TO_MSEC to sigrok-internal.h
Joel Holdsworth [Sun, 26 Feb 2012 12:18:05 +0000 (12:18 +0000)]
sr: Moved GTV_TO_MSEC to sigrok-internal.h

12 years agofx2lafw: Implemented firmware upload
Joel Holdsworth [Sat, 25 Feb 2012 11:58:55 +0000 (11:58 +0000)]
fx2lafw: Implemented firmware upload

12 years agofx2lafw: Renamed fx2lafw_dev to ctx in hw_dev_info_get
Joel Holdsworth [Mon, 27 Feb 2012 19:42:08 +0000 (19:42 +0000)]
fx2lafw: Renamed fx2lafw_dev to ctx in hw_dev_info_get

12 years agofx2lafw: Renamed fx2lafw_dev to ctx in hw_init
Joel Holdsworth [Mon, 27 Feb 2012 19:41:10 +0000 (19:41 +0000)]
fx2lafw: Renamed fx2lafw_dev to ctx in hw_init

12 years agofx2lafw: Renamed dev_insts variable in hw_init
Joel Holdsworth [Mon, 27 Feb 2012 20:50:00 +0000 (20:50 +0000)]
fx2lafw: Renamed dev_insts variable in hw_init

12 years agosr: sr_samplerate_string: Allow 3.15Hz etc. as output.
Uwe Hermann [Mon, 27 Feb 2012 21:27:33 +0000 (22:27 +0100)]
sr: sr_samplerate_string: Allow 3.15Hz etc. as output.

This is required for some hardware, e.g. ChronoVu LA8, where
33.333333 MHz or 2.439024 MHz are valid samplerates. This is because the
hardware takes a sampleperiod (in nanoseconds) as input, not a
samplerate (in Hz).

12 years agofx2lafw: Implemented hw_get_status
Joel Holdsworth [Sat, 11 Feb 2012 17:41:22 +0000 (17:41 +0000)]
fx2lafw: Implemented hw_get_status

12 years agofx2lafw: Exposed capabilities data
Joel Holdsworth [Sat, 11 Feb 2012 17:39:39 +0000 (17:39 +0000)]
fx2lafw: Exposed capabilities data

12 years agofx2lafw: Added probing for fx2lafw devices
Joel Holdsworth [Sat, 11 Feb 2012 16:08:47 +0000 (16:08 +0000)]
fx2lafw: Added probing for fx2lafw devices

12 years agofx2lafw: Added empty hardware module for fx2lafw
Joel Holdsworth [Sat, 11 Feb 2012 12:08:49 +0000 (12:08 +0000)]
fx2lafw: Added empty hardware module for fx2lafw

12 years agosr: la8: Improve comments and messages a bit.
Uwe Hermann [Thu, 23 Feb 2012 20:54:07 +0000 (21:54 +0100)]
sr: la8: Improve comments and messages a bit.

12 years agosr: No need for dynamic hardware driver registration.
Uwe Hermann [Wed, 22 Feb 2012 20:48:30 +0000 (21:48 +0100)]
sr: No need for dynamic hardware driver registration.

We don't need or allow run-time registration of hardware
drivers/plugins, they're added at compile-time.

12 years agosr: la8: Remove some unneeded checks.
Uwe Hermann [Wed, 22 Feb 2012 18:53:27 +0000 (19:53 +0100)]
sr: la8: Remove some unneeded checks.

12 years agosr: Consistent ctx name for per-dev-inst context.
Uwe Hermann [Sat, 18 Feb 2012 17:07:42 +0000 (18:07 +0100)]
sr: Consistent ctx name for per-dev-inst context.

12 years agosr: Fix incorrectly renamed functions.
Uwe Hermann [Sat, 18 Feb 2012 11:17:56 +0000 (12:17 +0100)]
sr: Fix incorrectly renamed functions.

12 years agosr: Remove unneeded temp. variable use.
Uwe Hermann [Sat, 18 Feb 2012 11:16:49 +0000 (12:16 +0100)]
sr: Remove unneeded temp. variable use.

12 years agosr: s/config_set/dev_config_set/.
Uwe Hermann [Sat, 18 Feb 2012 11:11:15 +0000 (12:11 +0100)]
sr: s/config_set/dev_config_set/.

This functions is per-device-instance, so use dev_ as prefix as with
the other ones.

12 years agosr: s/acquisition_*/dev_acquisition_*/.
Uwe Hermann [Sat, 18 Feb 2012 11:03:49 +0000 (12:03 +0100)]
sr: s/acquisition_*/dev_acquisition_*/.

These functions are per-device-instance, so use dev_ as prefix as with
the other ones.

12 years agosr: opendev/closedev -> dev_open/dev_close.
Uwe Hermann [Sat, 18 Feb 2012 10:57:43 +0000 (11:57 +0100)]
sr: opendev/closedev -> dev_open/dev_close.

12 years agosr: s/st*_acquisition/acquisition_st*/.
Uwe Hermann [Sat, 18 Feb 2012 10:46:51 +0000 (11:46 +0100)]
sr: s/st*_acquisition/acquisition_st*/.

12 years agosr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
Uwe Hermann [Sat, 18 Feb 2012 10:41:21 +0000 (11:41 +0100)]
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.

12 years agosr/cli/gtk/qt: s/configuration/config/.
Uwe Hermann [Fri, 17 Feb 2012 23:31:35 +0000 (00:31 +0100)]
sr/cli/gtk/qt: s/configuration/config/.

12 years agosr/cli/gtk: s/capability/hwcap/.
Uwe Hermann [Fri, 17 Feb 2012 23:17:18 +0000 (00:17 +0100)]
sr/cli/gtk: s/capability/hwcap/.

12 years agosr/cli/gtk: A few more s/instance/inst/.
Uwe Hermann [Fri, 17 Feb 2012 22:55:27 +0000 (23:55 +0100)]
sr/cli/gtk: A few more s/instance/inst/.

12 years agosr/cli/gtk/qt: s/device/dev/ in many places.
Uwe Hermann [Fri, 17 Feb 2012 21:25:01 +0000 (22:25 +0100)]
sr/cli/gtk/qt: s/device/dev/ in many places.

Also, a few s/instance/inst/ occurences.

12 years agosr: Some more s/device_instance/dev_inst/.
Uwe Hermann [Fri, 17 Feb 2012 20:02:52 +0000 (21:02 +0100)]
sr: Some more s/device_instance/dev_inst/.

12 years agosr: Random cosmetics, fix/amend Doxygen comments.
Uwe Hermann [Fri, 17 Feb 2012 19:44:19 +0000 (20:44 +0100)]
sr: Random cosmetics, fix/amend Doxygen comments.

12 years agosr: Prefix log messages with subsystem string.
Uwe Hermann [Fri, 17 Feb 2012 18:40:01 +0000 (19:40 +0100)]
sr: Prefix log messages with subsystem string.

12 years agosr: rename all sr_hwplugin(s)_* functions to sr_hw_*
Bert Vermeulen [Wed, 15 Feb 2012 02:18:48 +0000 (03:18 +0100)]
sr: rename all sr_hwplugin(s)_* functions to sr_hw_*

12 years agosr: la8: remove debug output when no device is found
Bert Vermeulen [Tue, 14 Feb 2012 12:18:17 +0000 (13:18 +0100)]
sr: la8: remove debug output when no device is found

12 years agosr: don't free driver-specific per-device struct in drivers
Bert Vermeulen [Tue, 14 Feb 2012 11:26:22 +0000 (12:26 +0100)]
sr: don't free driver-specific per-device struct in drivers

sr_dev_inst_free() takes care of that.

12 years agosr: rename more functions to sr_thing_action format
Bert Vermeulen [Mon, 13 Feb 2012 23:23:51 +0000 (00:23 +0100)]
sr: rename more functions to sr_thing_action format

Also improved the interface to find capabilities in a hardware plugin.

12 years agosr: rename all sr_device_instance_* functions to sr_dev_inst_*
Bert Vermeulen [Mon, 13 Feb 2012 14:31:59 +0000 (15:31 +0100)]
sr: rename all sr_device_instance_* functions to sr_dev_inst_*

12 years agosr: rename hwplugin functions to sr_thing_action format
Bert Vermeulen [Mon, 13 Feb 2012 14:23:16 +0000 (15:23 +0100)]
sr: rename hwplugin functions to sr_thing_action format

12 years agosr: Add missing #include, fixes warning.
Uwe Hermann [Mon, 13 Feb 2012 18:49:09 +0000 (19:49 +0100)]
sr: Add missing #include, fixes warning.

12 years agosr: cleanup callback: Return int.
Uwe Hermann [Sun, 12 Feb 2012 19:52:42 +0000 (20:52 +0100)]
sr: cleanup callback: Return int.

12 years agosr: stop_acquisition callback: Return int.
Uwe Hermann [Sun, 12 Feb 2012 12:31:58 +0000 (13:31 +0100)]
sr: stop_acquisition callback: Return int.

12 years agosr: adjust copyright year
Bert Vermeulen [Mon, 13 Feb 2012 13:31:51 +0000 (14:31 +0100)]
sr: adjust copyright year

12 years agosr: rename all sr_device_* functions to sr_dev_*
Bert Vermeulen [Mon, 13 Feb 2012 13:00:47 +0000 (14:00 +0100)]
sr: rename all sr_device_* functions to sr_dev_*

12 years agosr: more API cleanup and documentation
Bert Vermeulen [Mon, 13 Feb 2012 02:36:32 +0000 (03:36 +0100)]
sr: more API cleanup and documentation

12 years agosr: whitespace cleanup
Bert Vermeulen [Mon, 13 Feb 2012 01:16:32 +0000 (02:16 +0100)]
sr: whitespace cleanup

12 years agosr: clean up public/private split in headers
Bert Vermeulen [Mon, 13 Feb 2012 01:13:51 +0000 (02:13 +0100)]
sr: clean up public/private split in headers

12 years agosr: cleaned up session bus debug helper
Bert Vermeulen [Sun, 12 Feb 2012 23:08:23 +0000 (00:08 +0100)]
sr: cleaned up session bus debug helper

12 years agosr: public/private API cleanup in hwplugin
Bert Vermeulen [Sun, 12 Feb 2012 22:57:43 +0000 (23:57 +0100)]
sr: public/private API cleanup in hwplugin

12 years agosr: rm unused sr_device_clear() and sr_device_probe_clear()
Bert Vermeulen [Sun, 12 Feb 2012 21:36:19 +0000 (22:36 +0100)]
sr: rm unused sr_device_clear() and sr_device_probe_clear()

12 years agosr: sigrok.h is no longer generated
Bert Vermeulen [Sun, 12 Feb 2012 19:43:20 +0000 (20:43 +0100)]
sr: sigrok.h is no longer generated

12 years agoUse g_try_malloc/g_free/g_strdup consistently.
Uwe Hermann [Sat, 11 Feb 2012 19:06:46 +0000 (20:06 +0100)]
Use g_try_malloc/g_free/g_strdup consistently.

Avoid plain malloc()/free() in sr/srd, especially in the API calls.
Also avoid g_malloc*() in favor of g_try_malloc*().

Use g_strdup() instead of strdup() so that we can use g_free()
consistently everywhere.

Exceptions: Stuff that is allocated via other libs (not using glib),
should also be properly free'd using the respective free-ing function
(instead of g_free()). Examples: Stuff allocated by libusb, libftdi, etc.

Also, use sr_err() instead of sr_warn() for actual errors. sr_warn() is
meant for non-fatal/uncritical warnings.

12 years agosr: chronovu-la8: Add missing <stdlib.h> #include.
Uwe Hermann [Fri, 10 Feb 2012 23:39:25 +0000 (00:39 +0100)]
sr: chronovu-la8: Add missing <stdlib.h> #include.

12 years agosr: asix: Change a free() to g_free() as it should be.
Uwe Hermann [Fri, 10 Feb 2012 23:38:48 +0000 (00:38 +0100)]
sr: asix: Change a free() to g_free() as it should be.

This also fixes a compiler warning (on FreeBSD at least).

12 years agosr: FreeBSD has zlib, but no pkg-config file for it.
Uwe Hermann [Fri, 10 Feb 2012 23:34:16 +0000 (00:34 +0100)]
sr: FreeBSD has zlib, but no pkg-config file for it.

12 years agosr: MinGW/Mac: No libusb_detach_kernel_driver() support.
Uwe Hermann [Fri, 10 Feb 2012 23:20:23 +0000 (00:20 +0100)]
sr: MinGW/Mac: No libusb_detach_kernel_driver() support.

12 years agosr: Doxygen comments for loglevels.
Uwe Hermann [Wed, 8 Feb 2012 21:08:55 +0000 (22:08 +0100)]
sr: Doxygen comments for loglevels.

12 years agosr: Implement proper logging framework.
Uwe Hermann [Wed, 8 Feb 2012 21:04:13 +0000 (22:04 +0100)]
sr: Implement proper logging framework.

This is pretty much identical to the current libsigrokdecode API/framework.

12 years agosr: saleae: Fix typo.
Uwe Hermann [Tue, 7 Feb 2012 22:50:47 +0000 (23:50 +0100)]
sr: saleae: Fix typo.

12 years agosr: saleae: Support more recent firmwares.
Uwe Hermann [Tue, 7 Feb 2012 22:49:51 +0000 (23:49 +0100)]
sr: saleae: Support more recent firmwares.

12 years agosr: udev file: Add QuantAsylum QA100, Rigol VS5202D.
Uwe Hermann [Mon, 6 Feb 2012 22:50:22 +0000 (23:50 +0100)]
sr: udev file: Add QuantAsylum QA100, Rigol VS5202D.

12 years agosr: s/z60_sigrok.rules/z60_libsigrok.rules/.
Uwe Hermann [Mon, 6 Feb 2012 21:46:22 +0000 (22:46 +0100)]
sr: s/z60_sigrok.rules/z60_libsigrok.rules/.

12 years agosr: input/output: Mark more symbols with SR_PRIV.
Uwe Hermann [Sat, 4 Feb 2012 09:56:51 +0000 (10:56 +0100)]
sr: input/output: Mark more symbols with SR_PRIV.

12 years agoProject-wide consistent naming for #include guards.
Uwe Hermann [Sat, 4 Feb 2012 09:41:30 +0000 (10:41 +0100)]
Project-wide consistent naming for #include guards.

Document the naming scheme in HACKING.

12 years agosr/cli/gtk: Remove analog left-overs from API.
Uwe Hermann [Sat, 4 Feb 2012 09:10:43 +0000 (10:10 +0100)]
sr/cli/gtk: Remove analog left-overs from API.

This will come back in some form or another later, but for now
don't clutter the API with non-working stuff. Removing stuff from APIs
is not possible without breaking the API, adding stuff later is simpler.

12 years agosr: zeroplus: Drop unused global variable.
Uwe Hermann [Sun, 5 Feb 2012 12:37:02 +0000 (13:37 +0100)]
sr: zeroplus: Drop unused global variable.

12 years agosr: Compile fix for Windows/MinGW.
Uwe Hermann [Sun, 5 Feb 2012 12:36:03 +0000 (13:36 +0100)]
sr: Compile fix for Windows/MinGW.

12 years agoautogen.sh: aclocal support for Windows XP/Vista/7.
Uwe Hermann [Sun, 5 Feb 2012 11:54:44 +0000 (12:54 +0100)]
autogen.sh: aclocal support for Windows XP/Vista/7.

12 years agosr: Make more symbols private via static/SR_PRIV.
Uwe Hermann [Thu, 2 Feb 2012 20:15:04 +0000 (21:15 +0100)]
sr: Make more symbols private via static/SR_PRIV.

Additional zeroplus fixes:

 - Remove unneeded function prototypes from .h files.

 - Remove unused variables and/or use standard libusb #defines instead.

 - Remove unused GL_* error code #defines.

12 years agosr: zeroplus: Remove unused gl_open()/gl_close().
Uwe Hermann [Thu, 2 Feb 2012 20:08:33 +0000 (21:08 +0100)]
sr: zeroplus: Remove unused gl_open()/gl_close().

Merge the missing function calls into zeroplus.c's init functions.

12 years agosr: Mark API functions with SR_API/SR_PRIV.
Uwe Hermann [Wed, 1 Feb 2012 22:40:35 +0000 (23:40 +0100)]
sr: Mark API functions with SR_API/SR_PRIV.

Use SR_API to mark public API symbols, and SR_PRIV for private symbols.

Variables and functions marked 'static' are private already and don't
need SR_PRIV. However, functions which are not static (because they need
to be used in other libsigrok-internal files) but are also not meant to
be part of the public libsigrok API, must use SR_PRIV.

This uses the 'visibility' feature of gcc (requires gcc >= 4.0).

Details: http://gcc.gnu.org/wiki/Visibility