Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly access YottaDB data from C #59

Closed
ksbhaskar opened this issue Oct 19, 2017 · 0 comments
Closed

Directly access YottaDB data from C #59

ksbhaskar opened this issue Oct 19, 2017 · 0 comments
Assignees
Milestone

Comments

@ksbhaskar
Copy link
Member

ksbhaskar commented Oct 19, 2017

Final Release Note

The YottaDB engine is directly accessible using a C-callable API. See https://docs.yottadb.com/MultiLangProgGuide/index.html for user documentation.

Description

To access data in YottaDB without this enhancement requires either writing a small shim in M or using the GNP protocol over TCP (which does not support access to local variables or transaction processing). YottaDB needs direct, in-process calls from C (and since C is the lingua Franca of computer languages, from any language that has a C interface).

Draft Release Note

The YottaDB engine is directly accessible from C. See https://github.com/ksbhaskar/YottaDBdoc/blob/master/MultiLangProgGuide.rst for the [draft] user documentation.

@nars1 nars1 added this to the r120 milestone Nov 7, 2017
estess added a commit to estess/YottaDB that referenced this issue Nov 9, 2017
…le API - part 1

No major functionality add with this drop. The primary addition to the changes
mentioned in the README is that error ids have been changed from global ints
to simple #define values so they are constants instead of global variables.

Also retrofitted all changes to the new assembler modules for the newly supported
ARM platform.

Lastly, a regression or two with call-ins have been fixed and a few edge-case
day-one issues also with call-ins have been fixed:
1. HALT no longer halts but returns to the caller
2. ZHALT no longer halts and returns its argument to the caller.
3. QUIT with no arg when a return value was requested raises an error.
4. QUIT with an arg when no return value was expected raises an error.
5. Call with args to a routine that has none defined raises an error.
6. Various fixes dealing with return values when HALT/ZHALT/ZGOTO 0 are
   unwinding the stack that exploded were fixed.

Changes per module:

- All sr_armv7l/ assembler modules
  - Had cosmetic changes like putting all assembler directives at the first tab
    instead of in column zero to make things more standardized.

- All sr_armv7l/ AND sr_x86_64/ assembler modules
  - The .include for debug.si is changed to a #include so the C preprocessor pulls
    it in instead. This allows the ERR_GTMCHECK reference in the macro definitions
    in this include to get their numeric substitutions from "ydbmerrors.h".

- sr_armv7l/ci_restart.s
  - removed as no longer needed

- sr_armv7l/cmerrors_ctl.c
- sr_x86_64/cmerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/cmierrors_ctl.c
- sr_x86_64/cmierrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/debug.si
- sr_x86_64/debug.si
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/dm_start.s
- sr_x86_64/dm_start.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/gdeerrors_ctl.c
- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/libydberrors.h
- sr_x86_64/libydberrors.h
  - New file with #defines of error ids prefixed by YDB_ and with negative values that
    are used in the new simple API.

- sr_armv7l/merrors_ctl.c
- sr_x86_64/merrors_ctl.c
  - Minor message changes (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/op_exfun.s
- sr_x86_64/op_exfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extcall.s
- sr_x86_64/op_extcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extexfun.s
- sr_x86_64/op_extexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/op_extjmp.s
- sr_x86_64/op_extjmp.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofexfun.s
- sr_x86_64/op_mprofexfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextcall.s
- sr_x86_64/op_mprofextcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextexfun.s
- sr_x86_64/op_mprofextexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/ydbcmerrors.h
- sr_x86_64/ydbcmerrors.h
  - Remove stuff that belongs in cmerrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbcmierrors.h
- sr_x86_64/ydbcmierrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors.h
- sr_x86_64/ydberrors.h
  - Remove stuff that belongs in ydberrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors_ctl.c
- sr_x86_64/ydberrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/ydbgdeerrors.h
- sr_x86_64/ydbgdeerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbmerrors.h
- sr_x86_64/ydbmerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_linux/platform.cmake
  - Add specific include option for ydbmerrors.h for all assembler routines in both
    armv7l and x86_64 platforms.
  - Add option so all assembler routines are first processed with the C pre-processor
    to pick up error id definitions and do appropriate constant substitution.
  - Change the names of the entry points that we link with since all call-in entry point
    names changed from gtm_ to ydb_

- sr_port/cmerrors.msg
  - Minor message change to force recreation of the associated _ctl file.

- sr_port/cmidef.h
  - Add include to pick up new #define style cmierrors definitions.

- sr_port/cmmdef.h
  - Add include to pick up new #define style cmerrors definitions.

- sr_port/gdeerrors.msg
  - Minor message change to force recreation of the associated _ctl file.

- sr_port/goframes.c
  - Change some "spaces" white space to tabs.
  - Change the logic where a frame expecting a return code is unwound and a value placed
    such that if in a call-in and ZHALT has specified a return value, use that value
    instead of the default NULL/0 value. Allows ZHALT to return its value to call-in user.

- sr_port/gtm_common_defs.h
  - Remove #defines from no-longer-supported platforms.
  - Nullify output of error_def() macro as it is not needed anymore as all error #defines
    are always available to all routines that include mdef.h.

- sr_port/gtm_threadgbl_defs.h
  - Add gtmci_retval that holds the mval address where a return value is to be set if
    the frame is unwound via goframes(). Presently used to return value of ZHALT in
    call-in mode.

- sr_port/mdef.h
  - Add includes for ydbmerrors.h and ydberrors.h so all error codes are available to
    every compilation.

- sr_port/merrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_port/msg.m
  - Add an $ETRAP so errors aren't invisible.
  - Remove creation of LITDEF entries for each error id in *_ctl.c files.
  - Create ydb*.h header files that contain a #define for each error id.
  - For merrors.h, also create libydberrors.h that contain a YDB_ prefixed version of the
    error name (e.g. YDB_ERR_ACK) and whose value is the negated value of the actual id for
    use in the libyottadb API.
  - Remove VMS paths.

- sr_port/mumps.hlp
  - Fix message output in a ZMESSAGE example.

- sr_port/op_halt.c
  - The return code back to dm_start should be SUCCESS (1) instead of zero for a
    missing return code to set correctly.

- sr_port/op_zg1.c
  - Set the return code to dm_start to be SUCCESS overriding any previous value set.

- sr_port/op_zhalt.c
  - Set the return code to dm_start to be SUCCESS instead of the argument value. The
    argument value is saved in the gtmci_retval thread global for goframes() to find
    and use.
  - Return SUCCESS to dm_start().

- sr_port/ydberrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_unix/cmidefsp.h
  - Remove #defines for CMI_REASON_{IODONE, INTMSG, CONNECT} since they duplicate definitions
    in ydbcmierrors.h and have different values (don't know why).

- sr_unix/errorsp.h
  - Mostly cosmetic fix but change include to use quotes instead of angle brackets on name.

- sr_unix/exttab_parse.c
  - Relocate static tables from mid-code to top of routine per code standards.
  - Rename all gtm_* types to ydb_* types.

- sr_unix/fgncalsp.h
  - Rename all gtm_* types to ydb_* types.

- sr_unix/gtm.c
  - Remove conditional code for unsupported platforms.
  - Remove integer definitions for some errors as these errors are all defined by the
    the include pulled in by mdef.h.

- sr_unix/gtm_env.csh
  - Change gtm_ci entry point name to ydb_ci in the linker options definition.

- sr_unix/gtm_trigger.c
  - Factor out mumps_status initialization this is not a valid value for mumps_status
    but it serves to clear out any other (error) value that might be there as we
    gear up to start the trigger.
  - Added comment to mumps_status initialization to 0. This value does not last as it
    is almost immediately reset to SUCCESS (1) by dm_start.

-sr_unix/gtmci.c
  - Change static declaration of get_entry to a STATICFNDCL/STATICDEF definition instead.
  - Rename all gtm_* types and routines to ydb_* types.
  - Initialize gtmci_retval on entry to ydb_ci[p.j]().
  - Verify if calling a routine with parms that it has a formal list and raise the
    FMLLSTMISSING if not.
  - Rearrange some of the case statemments to stack entries doing same action.
  - Add call to op_exfunret() to validate/verify the return value if have one.
    This raises appropriate errors if the return value is not expected or is otherwise
    appropriate.

- sr_unix/gtmci.h
  - Rename gtm_ci_exec() to ydb_ci_exec()

- sr_unix/gtmci_signals.c
  - Code standard cosmetic changes to put opening brace on its own line.

- sr_unix/gtmexe_symbols.exp
- sr_unix/gtmshr_symbols.exp
  - Change call-in related exported names from gtm_* to ydb_*

- sr_unix/gtmxc_types.h
- sr_unix/ydbxc_types.h
  - Separated gtmxc_types.h into two parts:
    1. ydbxc_types.h - contains the ydb_* call-in routine definitions plus the ydb_* type
       definitions.
    2. gtmxc_types.h - includes ydbxc_types.h and also includes both the gtm_* types
       (typedef'd to ydb types) and the long deprecated xc_* types. In addition it contains
       some #defines to turn gtm_* call-in routine invocations into the new ydb_* routines.

- sr_unix/op_fnfgncal.c
  - Rename all gtm_* types to ydb_* types.

- sr_unix_gnp/cmierrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_x86_64/libydberrors.h
estess added a commit to estess/YottaDB that referenced this issue Nov 13, 2017
…commit to libyottadb.h which

will hold the needed definitions for the libyottadb simple API as well as the existing
call-in, call-out, plug-in etc uses of the types and routines it contains.
estess added a commit to estess/YottaDB that referenced this issue Nov 20, 2017
…le API - part 1

No major functionality add with this drop. The primary addition to the changes
mentioned in the README is that error ids have been changed from global ints
to simple #define values so they are constants instead of global variables.

Also retrofitted all changes to the new assembler modules for the newly supported
ARM platform.

Lastly, a regression or two with call-ins have been fixed and a few edge-case
day-one issues also with call-ins have been fixed:
1. HALT no longer halts but returns to the caller
2. ZHALT no longer halts and returns its argument to the caller.
3. QUIT with no arg when a return value was requested raises an error.
4. QUIT with an arg when no return value was expected raises an error.
5. Call with args to a routine that has none defined raises an error.
6. Various fixes dealing with return values when HALT/ZHALT/ZGOTO 0 are
   unwinding the stack that exploded were fixed.

Changes per module:

- All sr_armv7l/ assembler modules
  - Had cosmetic changes like putting all assembler directives at the first tab
    instead of in column zero to make things more standardized.

- All sr_armv7l/ AND sr_x86_64/ assembler modules
  - The .include for debug.si is changed to a #include so the C preprocessor pulls
    it in instead. This allows the ERR_GTMCHECK reference in the macro definitions
    in this include to get their numeric substitutions from "ydbmerrors.h".

- sr_armv7l/ci_restart.s
  - removed as no longer needed

- sr_armv7l/cmerrors_ctl.c
- sr_x86_64/cmerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/cmierrors_ctl.c
- sr_x86_64/cmierrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/debug.si
- sr_x86_64/debug.si
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/dm_start.s
- sr_x86_64/dm_start.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/gdeerrors_ctl.c
- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/libydberrors.h
- sr_x86_64/libydberrors.h
  - New file with #defines of error ids prefixed by YDB_ and with negative values that
    are used in the new simple API.

- sr_armv7l/merrors_ctl.c
- sr_x86_64/merrors_ctl.c
  - Minor message changes (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/op_exfun.s
- sr_x86_64/op_exfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extcall.s
- sr_x86_64/op_extcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extexfun.s
- sr_x86_64/op_extexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/op_extjmp.s
- sr_x86_64/op_extjmp.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofexfun.s
- sr_x86_64/op_mprofexfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextcall.s
- sr_x86_64/op_mprofextcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextexfun.s
- sr_x86_64/op_mprofextexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/ydbcmerrors.h
- sr_x86_64/ydbcmerrors.h
  - Remove stuff that belongs in cmerrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbcmierrors.h
- sr_x86_64/ydbcmierrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors.h
- sr_x86_64/ydberrors.h
  - Remove stuff that belongs in ydberrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors_ctl.c
- sr_x86_64/ydberrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/ydbgdeerrors.h
- sr_x86_64/ydbgdeerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbmerrors.h
- sr_x86_64/ydbmerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_linux/platform.cmake
  - Add specific include option for ydbmerrors.h for all assembler routines in both
    armv7l and x86_64 platforms.
  - Add option so all assembler routines are first processed with the C pre-processor
    to pick up error id definitions and do appropriate constant substitution.
  - Change the names of the entry points that we link with since all call-in entry point
    names changed from gtm_ to ydb_

- sr_port/cmerrors.msg
  - Minor message change to force recreation of the associated _ctl file.

- sr_port/cmidef.h
  - Add include to pick up new #define style cmierrors definitions.

- sr_port/cmmdef.h
  - Add include to pick up new #define style cmerrors definitions.

- sr_port/gdeerrors.msg
  - Minor message change to force recreation of the associated _ctl file.

- sr_port/goframes.c
  - Change some "spaces" white space to tabs.
  - Change the logic where a frame expecting a return code is unwound and a value placed
    such that if in a call-in and ZHALT has specified a return value, use that value
    instead of the default NULL/0 value. Allows ZHALT to return its value to call-in user.

- sr_port/gtm_common_defs.h
  - Remove #defines from no-longer-supported platforms.
  - Nullify output of error_def() macro as it is not needed anymore as all error #defines
    are always available to all routines that include mdef.h.

- sr_port/gtm_threadgbl_defs.h
  - Add gtmci_retval that holds the mval address where a return value is to be set if
    the frame is unwound via goframes(). Presently used to return value of ZHALT in
    call-in mode.

- sr_port/mdef.h
  - Add includes for ydbmerrors.h and ydberrors.h so all error codes are available to
    every compilation.

- sr_port/merrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_port/msg.m
  - Add an $ETRAP so errors aren't invisible.
  - Remove creation of LITDEF entries for each error id in *_ctl.c files.
  - Create ydb*.h header files that contain a #define for each error id.
  - For merrors.h, also create libydberrors.h that contain a YDB_ prefixed version of the
    error name (e.g. YDB_ERR_ACK) and whose value is the negated value of the actual id for
    use in the libyottadb API.
  - Remove VMS paths.

- sr_port/mumps.hlp
  - Fix message output in a ZMESSAGE example.

- sr_port/op_halt.c
  - The return code back to dm_start should be SUCCESS (1) instead of zero for a
    missing return code to set correctly.

- sr_port/op_zg1.c
  - Set the return code to dm_start to be SUCCESS overriding any previous value set.

- sr_port/op_zhalt.c
  - Set the return code to dm_start to be SUCCESS instead of the argument value. The
    argument value is saved in the gtmci_retval thread global for goframes() to find
    and use.
  - Return SUCCESS to dm_start().

- sr_port/ydberrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_unix/cmidefsp.h
  - Remove #defines for CMI_REASON_{IODONE, INTMSG, CONNECT} since they duplicate definitions
    in ydbcmierrors.h and have different values (don't know why).

- sr_unix/errorsp.h
  - Mostly cosmetic fix but change include to use quotes instead of angle brackets on name.

- sr_unix/exttab_parse.c
  - Relocate static tables from mid-code to top of routine per code standards.
  - Rename all gtm_* types to ydb_* types.

- sr_unix/fgncalsp.h
  - Rename all gtm_* types to ydb_* types.

- sr_unix/gtm.c
  - Remove conditional code for unsupported platforms.
  - Remove integer definitions for some errors as these errors are all defined by the
    the include pulled in by mdef.h.

- sr_unix/gtm_env.csh
  - Change gtm_ci entry point name to ydb_ci in the linker options definition.

- sr_unix/gtm_trigger.c
  - Factor out mumps_status initialization this is not a valid value for mumps_status
    but it serves to clear out any other (error) value that might be there as we
    gear up to start the trigger.
  - Added comment to mumps_status initialization to 0. This value does not last as it
    is almost immediately reset to SUCCESS (1) by dm_start.

-sr_unix/gtmci.c
  - Change static declaration of get_entry to a STATICFNDCL/STATICDEF definition instead.
  - Rename all gtm_* types and routines to ydb_* types.
  - Initialize gtmci_retval on entry to ydb_ci[p.j]().
  - Verify if calling a routine with parms that it has a formal list and raise the
    FMLLSTMISSING if not.
  - Rearrange some of the case statemments to stack entries doing same action.
  - Add call to op_exfunret() to validate/verify the return value if have one.
    This raises appropriate errors if the return value is not expected or is otherwise
    appropriate.

- sr_unix/gtmci.h
  - Rename gtm_ci_exec() to ydb_ci_exec()

- sr_unix/gtmci_signals.c
  - Code standard cosmetic changes to put opening brace on its own line.

- sr_unix/gtmexe_symbols.exp
- sr_unix/gtmshr_symbols.exp
  - Change call-in related exported names from gtm_* to ydb_*

- sr_unix/gtmxc_types.h
- sr_unix/ydbxc_types.h
  - Separated gtmxc_types.h into two parts:
    1. ydbxc_types.h - contains the ydb_* call-in routine definitions plus the ydb_* type
       definitions.
    2. gtmxc_types.h - includes ydbxc_types.h and also includes both the gtm_* types
       (typedef'd to ydb types) and the long deprecated xc_* types. In addition it contains
       some #defines to turn gtm_* call-in routine invocations into the new ydb_* routines.

- sr_unix/op_fnfgncal.c
  - Rename all gtm_* types to ydb_* types.

- sr_unix_gnp/cmierrors.msg
  - Minor message changes to force recreation of the associated _ctl file.

- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_x86_64/libydberrors.h
estess added a commit to estess/YottaDB that referenced this issue Nov 20, 2017
…commit to libyottadb.h which

will hold the needed definitions for the libyottadb simple API as well as the existing
call-in, call-out, plug-in etc uses of the types and routines it contains.
estess added a commit to estess/YottaDB that referenced this issue Nov 20, 2017
…le API - part 1

This commit contains multiple (now squashed) mini-commits as described below:

Drop 11/11/2017:
- No major functionality add with this drop. The primary change was renaming
  ydbxc_types.h originally created in the 10/19/2017 drop to libyottadb.h and
  the minor ripples that caused.

Drop 11/08/2017:
- Change how error message ids were defined in the code base. They used to be
  global integer values. I think this was to keep from having to include a
  large header file with #define values for the error ids but now even ARM
  processors handle this situation reasonably well.

- Also retrofitted all changes to the new assembler modules for the newly
  supported ARM platform.

- Lastly, a regression or two with call-ins have been fixed and a few edge-case
  day-one issues also with call-ins have been fixed:
  1. HALT no longer halts but returns to the caller
  2. ZHALT no longer halts but returns its argument to the caller as the
     return value.
  3. QUIT with no arg when a return value was requested raises an error.
  4. QUIT with an arg when no return value was expected raises an error.
  5. Call with args to a routine that has none defined raises an error.
  6. Fixes for various issues (mostly sig-11 segmentation violations) dealing
     with return values when HALT/ZHALT/ZGOTO 0 are unwinding the stack to return
     either a specified return value (ZHALT) or a default NULL or zero return
     value (HALT or ZGOTO 0).

Drop 10/19/2017:
- No real functionality additions. This drop is mostly "foundational" - likely
  a few more of these before anything really interesting comes along but it
  allows the new call-in interface to be used.

- Changes:
  - All of the call-in routines have been renamed to have a ydb_ prefix
    instead of a gtm_  prefix (e.g. gtm_cip() -> ydb_cip()). Note the gtm_
    prefix names are still available  but a macro definition in gtmxc_types.h
    converts them to ydb_ calls instead.
  - All of the call-in/external-call data types (e.g. gtm_int_t) have been
    changed to have a ydb_ prefix. Note the gtm_ prefix is still supported as
    are the native types (int, char, etc) and the long deprecated xc_ types.
    Note also there is a slight performance bump for using ydb_ types (only
    during initialization - no long term benefit).
  - The gtmxc_types.h header file has been separated into two parts:
      1. gtmxc_types.h contains the gtm_ prefixed type definitions as well as
         the macros that change calls to gtm_ prefixed callin routines to ydb_
	 routine calls. Also in here are the deprecated xc_ type definitions.
	 It also includes ydbxc_types.h (note ydbxc_types.h was renamed to
	 libyottadb.h in the 11/11/2017 drop).
      2. ydbxc_types.h contains the current set of call-in definitions with no
         backlevel support.

Changes per module:

- All sr_armv7l/ assembler modules
  - Had cosmetic changes like putting all assembler directives at the first tab
    instead of in column zero to make things more standardized.

- All sr_armv7l/ AND sr_x86_64/ assembler modules
  - The .include for debug.si is changed to a #include so the C preprocessor pulls
    it in instead. This allows the ERR_GTMCHECK reference in the macro definitions
    in this include to get their numeric substitutions from "ydbmerrors.h".

- sr_armv7l/ci_restart.s
  - removed as no longer needed

- sr_armv7l/cmerrors_ctl.c
- sr_x86_64/cmerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/cmierrors_ctl.c
- sr_x86_64/cmierrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/debug.si
- sr_x86_64/debug.si
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/dm_start.s
- sr_x86_64/dm_start.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/gdeerrors_ctl.c
- sr_x86_64/gdeerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/libydberrors.h
- sr_x86_64/libydberrors.h
  - New file with #defines of error ids prefixed by YDB_ and with negative values that
    are used in the new simple API.

- sr_armv7l/merrors_ctl.c
- sr_x86_64/merrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/op_exfun.s
- sr_x86_64/op_exfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extcall.s
- sr_x86_64/op_extcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extexfun.s
- sr_x86_64/op_extexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/op_extjmp.s
- sr_x86_64/op_extjmp.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofexfun.s
- sr_x86_64/op_mprofexfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextcall.s
- sr_x86_64/op_mprofextcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextexfun.s
- sr_x86_64/op_mprofextexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/ydbcmerrors.h
- sr_x86_64/ydbcmerrors.h
  - Remove stuff that belongs in cmerrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbcmierrors.h
- sr_x86_64/ydbcmierrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors.h
- sr_x86_64/ydberrors.h
  - Remove stuff that belongs in ydberrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors_ctl.c
- sr_x86_64/ydberrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/ydbgdeerrors.h
- sr_x86_64/ydbgdeerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbmerrors.h
- sr_x86_64/ydbmerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_linux/platform.cmake
  - Add specific include option for ydbmerrors.h for all assembler routines in both
    armv7l and x86_64 platforms.
  - Add option so all assembler routines are first processed with the C pre-processor
    to pick up error id definitions and do appropriate constant substitution.
  - Change the names of the entry points that we link with since all call-in entry point
    names changed from gtm_ to ydb_

- sr_port/cmidef.h
  - Add include to pick up new #define style cmierrors definitions.

- sr_port/cmmdef.h
  - Add include to pick up new #define style cmerrors definitions.

- sr_port/goframes.c
  - Change some "spaces" white space to tabs.
  - Change the logic where a frame expecting a return code is unwound and a value placed
    such that if in a call-in and ZHALT has specified a return value, use that value
    instead of the default NULL/0 value. Allows ZHALT to return its value to call-in user.

- sr_port/gtm_common_defs.h
  - Remove #defines from no-longer-supported platforms.
  - Nullify output of error_def() macro as it is not needed anymore as all error #defines
    are always available to all routines that include mdef.h.

- sr_port/gtm_threadgbl_defs.h
  - Add gtmci_retval that holds the mval address where a return value is to be set if
    the frame is unwound via goframes(). Presently used to return value of ZHALT in
    call-in mode.

- sr_port/mdef.h
  - Add includes for ydbmerrors.h and ydberrors.h so all error codes are available to
    every compilation.

- sr_port/merrors.msg
  - Minor changes in comments (GTM -> YottaDB).

- sr_port/msg.m
  - Add an $ETRAP so errors aren't invisible.
  - Remove creation of LITDEF entries for each error id in *_ctl.c files.
  - Create ydb*.h header files that contain a #define for each error id.
  - For merrors.h, also create libydberrors.h that contain a YDB_ prefixed version of the
    error name (e.g. YDB_ERR_ACK) and whose value is the negated value of the actual id for
    use in the libyottadb API.
  - Remove VMS paths.

- sr_port/mumps.hlp
  - Fix message output in a ZMESSAGE example.

- sr_port/op_halt.c
  - The return code back to dm_start should be SUCCESS (1) instead of zero to prevent
    ydb_ci[p]() from treating this as an error return which bypasses setting all output
    values (including return values) that the call-in was expected to fill. HALT
    depends on unwind processing in goframes() to supply a return value if one was
    expected from this call-in.

- sr_port/op_zg1.c
  - Set the return code to dm_start to be SUCCESS overriding any previous value set.

- sr_port/op_zhalt.c
  - Set the return code to dm_start to be SUCCESS instead of the argument value. The
    argument value is saved in the gtmci_retval thread global for goframes() to find
    and use.
  - Return SUCCESS to dm_start().

- sr_unix/cmidefsp.h
  - Remove #defines for CMI_REASON_{IODONE, INTMSG, CONNECT} since they duplicate definitions
    in ydbcmierrors.h and have different values (don't know why).

- sr_unix/errorsp.h
  - Mostly cosmetic fix but change include to use quotes instead of angle brackets on name.

- sr_unix/exttab_parse.c
  - Relocate static tables from mid-code to top of routine per code standards.
  - Rename all gtm_* types to ydb_* types.

- sr_unix/fgncalsp.h
  - Rename all gtm_* types to ydb_* types.

- sr_unix/gtm.c
  - Remove conditional code for unsupported platforms.
  - Remove integer definitions for some errors as these errors are all defined by the
    the include pulled in by mdef.h.

- sr_unix/gtm_env.csh
  - Change gtm_ci entry point name to ydb_ci in the linker options definition.

- sr_unix/gtm_trigger.c
  - Factor out mumps_status initialization this is not a valid value for mumps_status
    but it serves to clear out any other (error) value that might be there as we
    gear up to start the trigger.
  - Added comment to mumps_status initialization to 0. This value does not last as it
    is almost immediately reset to SUCCESS (1) by dm_start.

-sr_unix/gtmci.c
  - Change static declaration of get_entry to a STATICFNDCL/STATICDEF definition instead.
  - Rename all gtm_* types and routines to ydb_* types.
  - Initialize gtmci_retval on entry to ydb_ci[p.j]().
  - Verify if calling a routine with parms that it has a formal list and raise the
    FMLLSTMISSING if not.
  - Rearrange some of the case statemments to stack entries doing same action.
  - Add call to op_exfunret() to validate/verify the return value if have one.
    This raises appropriate errors if the return value is not expected or is otherwise
    appropriate.

- sr_unix/gtmci.h
  - Rename gtm_ci_exec() to ydb_ci_exec()

- sr_unix/gtmci_signals.c
  - Code standard cosmetic changes to put opening brace on its own line.

- sr_unix/gtmexe_symbols.exp
- sr_unix/gtmshr_symbols.exp
  - Change call-in related exported names from gtm_* to ydb_*

- sr_unix/gtmxc_types.h
- sr_unix/ydbxc_types.h
  - Separated gtmxc_types.h into two parts:
    1. ydbxc_types.h - contains the ydb_* call-in routine definitions plus the ydb_* type
       definitions.
    2. gtmxc_types.h - includes ydbxc_types.h and also includes both the gtm_* types
       (typedef'd to ydb types) and the long deprecated xc_* types. In addition it contains
       some #defines to turn gtm_* call-in routine invocations into the new ydb_* routines.

- sr_unix/op_fnfgncal.c
  - Rename all gtm_* types to ydb_* types.

- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_x86_64/libydberrors.h
estess added a commit to estess/YottaDB that referenced this issue Nov 20, 2017
…laying foundation for simple API

Discussion of changes:

- No major functionality add with this drop.

- Change how error message ids were defined in the code base. They used to be
  global integer values. I think this was to keep from having to include a
  large header file with #define values for the error ids on (much) slower
  systems but now even ARM processors handle this situation reasonably well.

- Also retrofitted all changes to the new assembler modules for the newly
  supported ARM platform.

- Some changes in how call-ins work along with a few edge-case day-one issues
  in a call-in environment have been fixed:
  1. HALT no longer halts but returns to the caller.
  2. ZHALT no longer halts but returns its argument to the call-in caller as
     the return value.
  3. QUIT with no parm when a return value was requested raises an error.
  4. QUIT with an parm when no return value was expected raises an error.
  5. Call with args to a routine that has none defined raises an error.
  6. Fixes for various issues (mostly sig-11 segmentation violations) dealing
     with return values when HALT/ZHALT/ZGOTO 0 are unwinding the stack to return
     either a specified return value (ZHALT) or a default NULL or zero return
     value (HALT or ZGOTO 0).

- All of the call-in routines have been renamed to have a ydb_ prefix
  instead of a gtm_  prefix (e.g. gtm_cip() -> ydb_cip()). Note the gtm_
  prefix names are still available  but a macro definition in gtmxc_types.h
  converts them to ydb_ calls instead.
- All of the call-in/external-call data types (e.g. gtm_int_t) have been
  changed to have a ydb_ prefix. Note the gtm_ prefix is still supported as
  are the native types (int, char, etc) and the long deprecated xc_ types.
  Note also there is a slight performance bump for using ydb_ types (only
  during initialization - no long term benefit).
- The gtmxc_types.h header file has been separated into two parts:
    1. gtmxc_types.h contains the gtm_ prefixed type definitions as well as
       the macros that change calls to gtm_ prefixed callin routines to ydb_
       routine calls. Also in here are the deprecated xc_ type definitions.
       It also includes libyottadb.h
    2. libyottadb.h contains the current set of call-in definitions with no
       compatibility support.

Changes per module:

- All sr_armv7l/ assembler modules
  - Had cosmetic changes like putting all assembler directives at the first tab
    instead of in column zero to make things more standardized.

- All sr_armv7l/ AND sr_x86_64/ assembler modules
  - The .include for debug.si is changed to a #include so the C preprocessor pulls
    it in instead. This allows the ERR_GTMCHECK reference in the macro definitions
    in this include to get their numeric substitutions from "ydbmerrors.h".

- sr_armv7l/ci_restart.s
  - removed as no longer needed

- sr_armv7l/cmerrors_ctl.c
- sr_x86_64/cmerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/cmierrors_ctl.c
- sr_x86_64/cmierrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/debug.si
- sr_x86_64/debug.si
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/dm_start.s
- sr_x86_64/dm_start.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/gdeerrors_ctl.c
- sr_x86_64/gdeerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/libydberrors.h
- sr_x86_64/libydberrors.h
  - New file with #defines of error ids prefixed by YDB_ and with negative values that
    are used in the new simple API.

- sr_armv7l/merrors_ctl.c
- sr_x86_64/merrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/op_exfun.s
- sr_x86_64/op_exfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extcall.s
- sr_x86_64/op_extcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extexfun.s
- sr_x86_64/op_extexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/op_extjmp.s
- sr_x86_64/op_extjmp.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofexfun.s
- sr_x86_64/op_mprofexfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextcall.s
- sr_x86_64/op_mprofextcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextexfun.s
- sr_x86_64/op_mprofextexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/ydbcmerrors.h
- sr_x86_64/ydbcmerrors.h
  - Remove stuff that belongs in cmerrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbcmierrors.h
- sr_x86_64/ydbcmierrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors.h
- sr_x86_64/ydberrors.h
  - Remove stuff that belongs in ydberrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors_ctl.c
- sr_x86_64/ydberrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/ydbgdeerrors.h
- sr_x86_64/ydbgdeerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbmerrors.h
- sr_x86_64/ydbmerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_linux/platform.cmake
  - Add specific include option for ydbmerrors.h for all assembler routines in both
    armv7l and x86_64 platforms.
  - Add option so all assembler routines are first processed with the C pre-processor
    to pick up error id definitions and do appropriate constant substitution.
  - Change the names of the entry points that we link with since all call-in entry point
    names changed from gtm_ to ydb_

- sr_port/cmidef.h
  - Add include to pick up new #define style cmierrors definitions.

- sr_port/cmmdef.h
  - Add include to pick up new #define style cmerrors definitions.

- sr_port/gdeerrors.msg
  - Update reference to GT.M to YottaDB instead.

- sr_port/goframes.c
  - Change some "spaces" white space to tabs.
  - Change the logic where a frame expecting a return code is unwound and a value placed
    such that if in a call-in and ZHALT has specified a return value, use that value
    instead of the default NULL/0 value. Allows ZHALT to return its value to call-in user.

- sr_port/gtm_common_defs.h
  - Remove #defines from no-longer-supported platforms.
  - Nullify output of error_def() macro as it is not needed anymore as all error #defines
    are always available to all routines that include mdef.h.

- sr_port/gtm_threadgbl_defs.h
  - Add gtmci_retval that holds the mval address where a return value is to be set if
    the frame is unwound via goframes(). Presently used to return value of ZHALT in
    call-in mode.

- sr_port/mdef.h
  - Add includes for ydbmerrors.h and ydberrors.h so all error codes are available to
    every compilation.

- sr_port/merrors.msg
  - Minor changes in comments (GTM -> YottaDB).
  - Change NOTEXTRINSIC error message from "Quit does not return.." to QUIT/ZHALT reference
    instead.

- sr_port/msg.m
  - Add an $ETRAP so errors aren't invisible.
  - Remove creation of LITDEF entries for each error id in *_ctl.c files.
  - Create ydb*.h header files that contain a #define for each error id.
  - For merrors.h, also create libydberrors.h that contain a YDB_ prefixed version of the
    error name (e.g. YDB_ERR_ACK) and whose value is the negated value of the actual id for
    use in the libyottadb API.
  - Remove VMS paths.

- sr_port/mumps.hlp
  - Fix message output in a ZMESSAGE example.

- sr_port/op_halt.c
  - The return code back to dm_start should be SUCCESS (1) instead of zero to prevent
    ydb_ci[p]() from treating this as an error return which bypasses setting all output
    values (including return values) that the call-in was expected to fill. HALT
    depends on unwind processing in goframes() to supply a return value if one was
    expected from this call-in.

- sr_port/op_zg1.c
  - Set the return code to dm_start to be SUCCESS overriding any previous value set.

- sr_port/op_zhalt.c
  - Set the return code to dm_start to be SUCCESS instead of the argument value. The
    argument value is saved in the gtmci_retval thread global for goframes() to find
    and use.
  - Return SUCCESS to dm_start().

- sr_unix/cmidefsp.h
  - Remove #defines for CMI_REASON_{IODONE, INTMSG, CONNECT} since they duplicate definitions
    in ydbcmierrors.h and have different values (don't know why).

- sr_unix/errorsp.h
  - Mostly cosmetic fix but change include to use quotes instead of angle brackets on name.

- sr_unix/exttab_parse.c
  - Relocate static tables from mid-code to top of routine per code standards.
  - Rename all gtm_* types to ydb_* types.

- sr_unix/fgncalsp.h
  - Rename all gtm_* types to ydb_* types.

- sr_unix/gtm.c
  - Remove conditional code for unsupported platforms.
  - Remove integer definitions for some errors as these errors are all defined by the
    the include pulled in by mdef.h.

- sr_unix/gtm_env.csh
  - Change gtm_ci entry point name to ydb_ci in the linker options definition.

- sr_unix/gtm_trigger.c
  - Factor out mumps_status initialization this is not a valid value for mumps_status
    but it serves to clear out any other (error) value that might be there as we
    gear up to start the trigger.
  - Added comment to mumps_status initialization to 0. This value does not last as it
    is almost immediately reset to SUCCESS (1) by dm_start.

- sr_unix/gtmci.c
  - Change static declaration of get_entry to a STATICFNDCL/STATICDEF definition instead.
  - Rename all gtm_* types and routines to ydb_* types.
  - Initialize gtmci_retval on entry to ydb_ci[p.j]().
  - Verify if calling a routine with parms that it has a formal list and raise the
    FMLLSTMISSING if not.
  - Rearrange some of the case statemments to stack entries doing same action.
  - Add call to op_exfunret() to validate/verify the return value if have one.
    This raises appropriate errors if the return value is not expected or is otherwise
    appropriate.

- sr_unix/gtmci.h
  - Rename gtm_ci_exec() to ydb_ci_exec()

- sr_unix/gtmci_signals.c
  - Code standard cosmetic changes to put opening brace on its own line.

- sr_unix/gtmexe_symbols.exp
- sr_unix/gtmshr_symbols.exp
  - Change call-in related exported names from gtm_* to ydb_*

- sr_unix/gtmxc_types.h
- sr_unix/libyottadb.h
  - Separated gtmxc_types.h into two parts:
    1. libyottadb.h - contains the ydb_* call-in routine definitions plus the ydb_* type
       definitions. Basically all the base types supported by YottaDB. It also contains the
       declarations for other exported entry points callable by code outside of YottaDB.
       (Note there is still re-branding work to do with some of the interface routines but
       those that are primarily call-in or call-out related are taken care of by this update.
    2. gtmxc_types.h - includes libyottadb.h and also includes both the gtm_* types
       (typedef'd to ydb types) and the long deprecated xc_* types. In addition it contains
       some #defines to turn gtm_* call-in routine invocations into the new ydb_* routines.
       This is now primarily a compatibility header file in that it supports the previous
       type and routine naming conventions.

- sr_unix/op_fnfgncal.c
  - Rename all gtm_* types to ydb_* types.

- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_x86_64/libydberrors.h
estess added a commit that referenced this issue Nov 20, 2017
#92)

* [#59] [estess] [nars1] Changes fixing/supporting call-ins and laying foundation for simple API

Discussion of changes:

- No major functionality add with this drop.

- Change how error message ids were defined in the code base. They used to be
  global integer values. I think this was to keep from having to include a
  large header file with #define values for the error ids on (much) slower
  systems but now even ARM processors handle this situation reasonably well.

- Also retrofitted all changes to the new assembler modules for the newly
  supported ARM platform.

- Some changes in how call-ins work along with a few edge-case day-one issues
  in a call-in environment have been fixed:
  1. HALT no longer halts but returns to the caller.
  2. ZHALT no longer halts but returns its argument to the call-in caller as
     the return value.
  3. QUIT with no parm when a return value was requested raises an error.
  4. QUIT with an parm when no return value was expected raises an error.
  5. Call with args to a routine that has none defined raises an error.
  6. Fixes for various issues (mostly sig-11 segmentation violations) dealing
     with return values when HALT/ZHALT/ZGOTO 0 are unwinding the stack to return
     either a specified return value (ZHALT) or a default NULL or zero return
     value (HALT or ZGOTO 0).

- All of the call-in routines have been renamed to have a ydb_ prefix
  instead of a gtm_  prefix (e.g. gtm_cip() -> ydb_cip()). Note the gtm_
  prefix names are still available  but a macro definition in gtmxc_types.h
  converts them to ydb_ calls instead.
- All of the call-in/external-call data types (e.g. gtm_int_t) have been
  changed to have a ydb_ prefix. Note the gtm_ prefix is still supported as
  are the native types (int, char, etc) and the long deprecated xc_ types.
  Note also there is a slight performance bump for using ydb_ types (only
  during initialization - no long term benefit).
- The gtmxc_types.h header file has been separated into two parts:
    1. gtmxc_types.h contains the gtm_ prefixed type definitions as well as
       the macros that change calls to gtm_ prefixed callin routines to ydb_
       routine calls. Also in here are the deprecated xc_ type definitions.
       It also includes libyottadb.h
    2. libyottadb.h contains the current set of call-in definitions with no
       compatibility support.

Changes per module:

- All sr_armv7l/ assembler modules
  - Had cosmetic changes like putting all assembler directives at the first tab
    instead of in column zero to make things more standardized.

- All sr_armv7l/ AND sr_x86_64/ assembler modules
  - The .include for debug.si is changed to a #include so the C preprocessor pulls
    it in instead. This allows the ERR_GTMCHECK reference in the macro definitions
    in this include to get their numeric substitutions from "ydbmerrors.h".

- sr_armv7l/ci_restart.s
  - removed as no longer needed

- sr_armv7l/cmerrors_ctl.c
- sr_x86_64/cmerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/cmierrors_ctl.c
- sr_x86_64/cmierrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/debug.si
- sr_x86_64/debug.si
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/dm_start.s
- sr_x86_64/dm_start.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/gdeerrors_ctl.c
- sr_x86_64/gdeerrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/libydberrors.h
- sr_x86_64/libydberrors.h
  - New file with #defines of error ids prefixed by YDB_ and with negative values that
    are used in the new simple API.

- sr_armv7l/merrors_ctl.c
- sr_x86_64/merrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/op_exfun.s
- sr_x86_64/op_exfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extcall.s
- sr_x86_64/op_extcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_extexfun.s
- sr_x86_64/op_extexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/op_extjmp.s
- sr_x86_64/op_extjmp.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofexfun.s
- sr_x86_64/op_mprofexfun.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextcall.s
- sr_x86_64/op_mprofextcall.s
  - Change ERR_GTMCHECK access from global int to #define value

- sr_armv7l/op_mprofextexfun.s
- sr_x86_64/op_mprofextexfun.s
  - Change ERR_GTMCHECK & ERR_FMLLSTMISSING access from global int to #define value

- sr_armv7l/ydbcmerrors.h
- sr_x86_64/ydbcmerrors.h
  - Remove stuff that belongs in cmerrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbcmierrors.h
- sr_x86_64/ydbcmierrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors.h
- sr_x86_64/ydberrors.h
  - Remove stuff that belongs in ydberrors_ctl.c (invalid generation and botched rebase).
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydberrors_ctl.c
- sr_x86_64/ydberrors_ctl.c
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_armv7l/ydbgdeerrors.h
- sr_x86_64/ydbgdeerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_armv7l/ydbmerrors.h
- sr_x86_64/ydbmerrors.h
  - New error definition file with #defines of error ids replacing global int vals.

- sr_linux/platform.cmake
  - Add specific include option for ydbmerrors.h for all assembler routines in both
    armv7l and x86_64 platforms.
  - Add option so all assembler routines are first processed with the C pre-processor
    to pick up error id definitions and do appropriate constant substitution.
  - Change the names of the entry points that we link with since all call-in entry point
    names changed from gtm_ to ydb_

- sr_port/cmidef.h
  - Add include to pick up new #define style cmierrors definitions.

- sr_port/cmmdef.h
  - Add include to pick up new #define style cmerrors definitions.

- sr_port/gdeerrors.msg
  - Update reference to GT.M to YottaDB instead.

- sr_port/goframes.c
  - Change some "spaces" white space to tabs.
  - Change the logic where a frame expecting a return code is unwound and a value placed
    such that if in a call-in and ZHALT has specified a return value, use that value
    instead of the default NULL/0 value. Allows ZHALT to return its value to call-in user.

- sr_port/gtm_common_defs.h
  - Remove #defines from no-longer-supported platforms.
  - Nullify output of error_def() macro as it is not needed anymore as all error #defines
    are always available to all routines that include mdef.h.

- sr_port/gtm_threadgbl_defs.h
  - Add gtmci_retval that holds the mval address where a return value is to be set if
    the frame is unwound via goframes(). Presently used to return value of ZHALT in
    call-in mode.

- sr_port/mdef.h
  - Add includes for ydbmerrors.h and ydberrors.h so all error codes are available to
    every compilation.

- sr_port/merrors.msg
  - Minor changes in comments (GTM -> YottaDB).
  - Change NOTEXTRINSIC error message from "Quit does not return.." to QUIT/ZHALT reference
    instead.

- sr_port/msg.m
  - Add an $ETRAP so errors aren't invisible.
  - Remove creation of LITDEF entries for each error id in *_ctl.c files.
  - Create ydb*.h header files that contain a #define for each error id.
  - For merrors.h, also create libydberrors.h that contain a YDB_ prefixed version of the
    error name (e.g. YDB_ERR_ACK) and whose value is the negated value of the actual id for
    use in the libyottadb API.
  - Remove VMS paths.

- sr_port/mumps.hlp
  - Fix message output in a ZMESSAGE example.

- sr_port/op_halt.c
  - The return code back to dm_start should be SUCCESS (1) instead of zero to prevent
    ydb_ci[p]() from treating this as an error return which bypasses setting all output
    values (including return values) that the call-in was expected to fill. HALT
    depends on unwind processing in goframes() to supply a return value if one was
    expected from this call-in.

- sr_port/op_zg1.c
  - Set the return code to dm_start to be SUCCESS overriding any previous value set.

- sr_port/op_zhalt.c
  - Set the return code to dm_start to be SUCCESS instead of the argument value. The
    argument value is saved in the gtmci_retval thread global for goframes() to find
    and use.
  - Return SUCCESS to dm_start().

- sr_unix/cmidefsp.h
  - Remove #defines for CMI_REASON_{IODONE, INTMSG, CONNECT} since they duplicate definitions
    in ydbcmierrors.h and have different values (don't know why).

- sr_unix/errorsp.h
  - Mostly cosmetic fix but change include to use quotes instead of angle brackets on name.

- sr_unix/exttab_parse.c
  - Relocate static tables from mid-code to top of routine per code standards.
  - Rename all gtm_* types to ydb_* types.

- sr_unix/fgncalsp.h
  - Rename all gtm_* types to ydb_* types.

- sr_unix/gtm.c
  - Remove conditional code for unsupported platforms.
  - Remove integer definitions for some errors as these errors are all defined by the
    the include pulled in by mdef.h.

- sr_unix/gtm_env.csh
  - Change gtm_ci entry point name to ydb_ci in the linker options definition.

- sr_unix/gtm_trigger.c
  - Factor out mumps_status initialization this is not a valid value for mumps_status
    but it serves to clear out any other (error) value that might be there as we
    gear up to start the trigger.
  - Added comment to mumps_status initialization to 0. This value does not last as it
    is almost immediately reset to SUCCESS (1) by dm_start.

- sr_unix/gtmci.c
  - Change static declaration of get_entry to a STATICFNDCL/STATICDEF definition instead.
  - Rename all gtm_* types and routines to ydb_* types.
  - Initialize gtmci_retval on entry to ydb_ci[p.j]().
  - Verify if calling a routine with parms that it has a formal list and raise the
    FMLLSTMISSING if not.
  - Rearrange some of the case statemments to stack entries doing same action.
  - Add call to op_exfunret() to validate/verify the return value if have one.
    This raises appropriate errors if the return value is not expected or is otherwise
    appropriate.

- sr_unix/gtmci.h
  - Rename gtm_ci_exec() to ydb_ci_exec()

- sr_unix/gtmci_signals.c
  - Code standard cosmetic changes to put opening brace on its own line.

- sr_unix/gtmexe_symbols.exp
- sr_unix/gtmshr_symbols.exp
  - Change call-in related exported names from gtm_* to ydb_*

- sr_unix/gtmxc_types.h
- sr_unix/libyottadb.h
  - Separated gtmxc_types.h into two parts:
    1. libyottadb.h - contains the ydb_* call-in routine definitions plus the ydb_* type
       definitions. Basically all the base types supported by YottaDB. It also contains the
       declarations for other exported entry points callable by code outside of YottaDB.
       (Note there is still re-branding work to do with some of the interface routines but
       those that are primarily call-in or call-out related are taken care of by this update.
    2. gtmxc_types.h - includes libyottadb.h and also includes both the gtm_* types
       (typedef'd to ydb types) and the long deprecated xc_* types. In addition it contains
       some #defines to turn gtm_* call-in routine invocations into the new ydb_* routines.
       This is now primarily a compatibility header file in that it supports the previous
       type and routine naming conventions.

- sr_unix/op_fnfgncal.c
  - Rename all gtm_* types to ydb_* types.

- sr_x86_64/gdeerrors_ctl.c
  - Minor message change (in .msg file) to force recreation of this _ctl file.
  - Removal of the error message id LITDEFs as these are changed to #defines now.

- sr_x86_64/libydberrors.h

* Fixes due to review comments
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 5, 2017
…by the java test

Below are the issues.

1) Various modules : The prior commit changed names of functions to have ydb_ prefix instead
   of the gtm_ prefix. But the latest java plugin has the function names with the gtm_ prefix
   hardcoded and since we do not want to maintain the java plugin at this point in time,
   we need to provide function names with both the ydb_ and gtm_ prefix.

2) gtmci.c : The prior commit had added a call to op_exfunret() in the ydb_cij() function.
   But this was in the wrong place (should have been in the "if" block instead of the "else"
   block). This is now fixed like how it is in the ydb_ci_exec() function.

3) op_fnfgncal.c : The prior commit had changed the name "gtm_xcj" to be "ydb_xcj". But the
   java plugin is the one that defines this function and, again since we want to avoid having
   to maintain the java plugin at this point in time, the name check done here is reverted to
   use "gtm_xcj".

The java test passes after these fixes.
nars1 added a commit that referenced this issue Dec 5, 2017
Below are the issues.

1) Various modules : The prior commit changed names of functions to have ydb_ prefix instead
   of the gtm_ prefix. But the latest java plugin has the function names with the gtm_ prefix
   hardcoded and since we do not want to maintain the java plugin at this point in time,
   we need to provide function names with both the ydb_ and gtm_ prefix.

2) gtmci.c : The prior commit had added a call to op_exfunret() in the ydb_cij() function.
   But this was in the wrong place (should have been in the "if" block instead of the "else"
   block). This is now fixed like how it is in the ydb_ci_exec() function.

3) op_fnfgncal.c : The prior commit had changed the name "gtm_xcj" to be "ydb_xcj". But the
   java plugin is the one that defines this function and, again since we want to avoid having
   to maintain the java plugin at this point in time, the name check done here is reverted to
   use "gtm_xcj".

The java test passes after these fixes.
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…b_set_s() simpleAPI

- Also fixes issue where the new message file ydberrors.msg was having two files created
  (ydberrors.h and libydberrors2.h) but these extensions of the error definitions were
  not chained to from the main error definition files created from merrors.msg (ydbmerrors.h and
  libydberrors.h respectively). These latter two files now have an include at the bottom of them
  that includes ydberrors.h/libydberrors2.h as appropriate.
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…SS is done again to ensure lcl_gtm_threadgbl is updated to a non-NULL value for the caller function
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…ydb_init() invocation

This means we can invoke ydb_ci() without invoking ydb_init() like was necessary in r1.10.
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…tine will be in its own module.

Also separated out the error handler as that is going to get significantly larger.
Added code to track the rebuffered inputs so garbage collection can get ahold of them.
The lvnsetstress subtest is still intermittently failing.
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…commits on top of stashed work (had to manually copy sr_unix/libyottadb_int.h and sr_unix/ydb_set_s.c)
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…want this pointing to caller base C program memory which could be overwritten)
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
1. (libyottadb.h) Rename LYDB_BUFFER_LITERAL() macro to match spec's YDB_STRLIT_TO_BUFFER().
2. (libyottadb_int.h) Modify MAX_SAPI_MSTR_GC_INDX to include slots for varname and value.
3. (libyottadb_int.h) Add separate SVNOSET error if ISV is not settable.
4. (libyottadb_int.h) Return the correct value for the ISV (not index into array but the opcode).
5. (libyottadb_int.h) Add RECORD_MSTR_FOR_GC() macro for the varname rebuffer so is tracked by GC.
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
… error) needs to be raised for an invalid value b) Do not return an error code from within macro after an ESTABLISH has been done in caller (causes problems with condition handler stack) but instead do rts_error just like other places do (which will automatically unwind the established condition handler)
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
… if they are declared as fatal type (issue was IS_GTM_ERROR macro only examined merrors_ctl and not ydberrors_ctl array)
nars1 added a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
… as first char after the ^ but not in later chars)
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
…a new error message when no buffer for value is supplied
nars1 pushed a commit to nars1/YottaDB that referenced this issue Dec 26, 2017
nars1 pushed a commit that referenced this issue Mar 27, 2018
21. [DONE] Add condition handlers to utility routines.

22. [DONE] Add check for process_exiting to utility routines to prevent
    calls after YottaDB closes down (ydb_exit driven).

23. [DONE] Make TPTIMEOUT work. Added outofband checking to each
    simpleAPI call and blocked the other 3 (maybe 4) outofband
    types if the environment is simpleAPI (current frame is simpleAPI
    base frame). Also allow ^C (in outofband processing) to exit for
    simpleAPI mode.

26. [DONE] Change ydb_exit() where it checks that it is not running an
    external call that check should be bypassed when the process is
    exiting (process_exiting is set).

28. [DONE] Change YDB_MAX_STR from (1 * 1000 * 1000) to (1 * 1024 * 1024).
nars1 pushed a commit that referenced this issue Mar 27, 2018
24. [DONE] Change gtmdbglvl to ydb_dbglvl.

25. [DONE] Change gtmgbldir to ydb_gbldir.

27. [DONE] Change gtm_maxtptime to ydb_maxtptime.

29. [DONE] Do not set $ECODE (done in set_zstatus) in simpleAPI mode.

30. [DONE] Change enum delete type to int type in routine and in libyottadb.
    Also change var name to deltype instead of delete_method.

31. [DONE] In ydb_delete_s() where we check the delete method, bad value
    should raise UNIMPLOP instead of assertpro.

32. [DONE] Change ydb_delete_s() so if no vars are specified it is an error
    instead of having it delete all vars.

33. [DONE] If no vars are specified to ydb_delete_excl_s(), then delete all
    local variables.

34. [DONE] Change the parameter names to match the spec in the utility
    routines.

35. [DONE] In ydb_timer_start.c need to convert the time parameter to ms
    before checking it for max value and sending it along.

36. a. [DONE] Change the name of YDB_MAX_LOCKTIME to YDB_MAX_TIME to make
       it more general so the max can be used elsewhere.
    b. [DONE] Change the name/content of ERR_TIMEOUT2LONG to make it more
       generic also (time specified exceeds maximum sort of thing).
    c. [DONE] Add the maximum time checks and raising error if too big to
       ydb_hiber_start(), ydb_hiber_start_wait_any() and ydb_timer_start().

37. [DONE] Create new type of function pointer "ydb_funcptr_retvoid_t" and
    use it as the function pointer type for the ydb_timer_start() parm.
nars1 pushed a commit that referenced this issue Mar 27, 2018
38. [DONE] In USEC_SLEEP() change * 1000 to * 1000L so result is correct
    type. Also do the same in gt_timer.c line 348 or so.

39. [DONE] Change ydb_zmaxtptime to ydb_maxtptime (like TODO 27 said) and
    fix test.

40. [DONE] Remove YDB_ERR_UNKNOWN error.

42. [DONE] Change LVUNDEF_OK to ERR_LVUNDEF_OK.

43. [DONE] Change YDB_MAX_NAMES to 35.

44. [DONE] Fix error with ydb_gbldir not being picked up.

45. [DONE] Add INVNAMECOUNT check and error to ydb_tp_s() and
    ydb_delete_excl_s().

46. [DONE] All error checking including parameters should occur before
    all locks are released in ydb_lock_s().

47. [DONE] All ydb_* functions should return either int or void - except
    the one oddball ydb_malloc() which returns a void *.

48. [DONE] Rename YDB_ERROR_SEVERITY() macro to YDB_SEVERITY() and the
    severity codes to YDB_SEVERITY_*.
nars1 pushed a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
…out (if 1 second was specified, they used to wait for 1000 seconds)
nars1 added a commit that referenced this issue Mar 27, 2018
…RT2 error (which is implicit TP but is different from implicit TP created by a non-TP update in M)
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 pushed a commit that referenced this issue Mar 27, 2018
1. [#189] Changed openlog() so it call routines get_syslog_flags which fetches the appropriate syslog flags depending on whether /dev/log exists or not
2. [#59] YDB_MAX_TIME name changed to YDB_MAX_TIME_NSEC to reflect nano-second unit of measure.
3. [#59] Fix to sapi-return_subscr_nodes.c which would not have properly reflected INSUFFSUBS when appropriate.
nars1 added a commit that referenced this issue Mar 27, 2018
…vious commit (simpleapi/nodenext and simpleapi/nodeprev subtests pass now)
nars1 added a commit that referenced this issue Mar 27, 2018
…timer_start/ydb_hiber_start/ydb_hiber_start_wait_any to return int (instead of void) as they can return YDB_ERR_TIME2LONG
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
nars1 added a commit that referenced this issue Mar 27, 2018
…NTTOOHI, nix MISSINGVARNAMES, MISSINGVARNAME)

1) MISSINGVARNAMES was an unused error message so removed it.

2) MISSINGVARNAME was being issued in ydb_delete_s() if input varname is NULL. But not sure
   why that should be treated any different than a NULL varname passed to ydb_set_s(), ydb_get_s()
   etc. Therefore removed that error message.

3) Renamed TOOMANYVARNAMES error name to NAMECOUNTTOOHI to be more in line with the INVNAMECOUNT
   error. As part of that, enhanced NAMECOUNTTOOHI to indicate the ydb_*_s() call which got that
   error (just like the INVNAMECOUNT error).

4) Added the NAMECOUNTTOOHI error in ydb_lock_s() (missed out in prior commit).
nars1 pushed a commit that referenced this issue Mar 27, 2018
…ROR2)

1. First, the FATALERRORx messages were switched where they were being generated. So
   you'll see the messages reversed now. Previously FATALERROR2 (no core) was coming out
   when we WERE generating a core. When we generate a core, we are now putting out FATALERROR1.

2. I wasn't aware where we were generating the core but it turns out it was in ch_cond_core()
   which is called by the DRIVECH() macro before it drives the top condition handler. I
   added a !IS_SIMPLEAPI_MODE in there so we decide whether to core or not in our condition
   handler. Core generation for ERR_MEMORY and ERR_STACKOFLOW will probably be removed from
   ch_cond_core() altogether when the FATALERRORx scheme migrates to the rest of YottaDB.

3. The entire section that stops the process in ydb_simpleapi_ch() was being bypassed by
   the inclusion of !SUPPRESS_DUMP - which because ch_cond_core() created a core meant the
   handler returned to ydb_set_s() and loops like crazy.

4. Had a '!' when I should not have on the debug flag test which caused the wrong message
   (and lack of core once I stopped ch_cond_core() from generating one).

5. Also changed the GTM_FATAL_ERROR*.txt file to a YDB_FATAL_ERROR*.txt file.
nars1 pushed a commit that referenced this issue Mar 27, 2018
1. Fix ydb_exit() to properly allow a call with process_exiting set so long as gtm_startup_active is also set.
2. Change all SKIP_BASE_FRAME invocations to SKIP_BASE_FRAMES and make the new macro be able to unwind past adjacent base frames of same or dissimilar types.
3. Visit all places where SFT_CI is used to make sure they are able to jump both TRIGGER and call-in base frames if that is appropriate (additional uses of SKIP_BASE_FRAMES was used in this effort).
4. Reverted gtm_filename_to_id() to what it was before (logic wise) undoing the attempt to return an error code.
5. Modified ydb_file_name_to_id() to no longer be a wrapper for gtm_filename_to_id() but now has simliar logic in that DOES return an error code.
6. The -1 return codes from ydb_thread_is_main() and ydb_file_is_identical() are changed to YDB_NOTOK which is an error code added to libyottadb.h (not a real error - just a value like YDB_LOCK_TIMEOUT).
7. Added invocation to create the YDB_FATAL_ERROR file when a fatal error is encountered in simpleAPI.
chathaway-codes pushed a commit that referenced this issue May 8, 2019
…_incr_s.c introduced in [#59]

There was an assert in ydb_incr_s.c which expected that the result of an op_add() will never
have the MV_STR bit set. But it is possible if the input node is an lvn and is not defined
and the increment is a string literal mval (MV_STR bit is already set), the result of the
ydb_incr_s() would be a copy of the string literal mval with the MV_STR bit set. That would
fail the assert (the recently enhanced go/random_walk subtest failed this assert).

Note that SET_YDB_BUFF_T_FROM_MVAL invoked at the end of ydb_incr_s() does a MV_FORCE_STR of the result
if it does not already have the MV_STR bit set so the assert served no purpose and is now removed..
chathaway-codes pushed a commit that referenced this issue May 13, 2019
The r126/random_walk subtest failed with a STACKCRIT error. Analysis of this led to
an M-stack leak from $QUERY(lvn,-1).

Commit (SHA 10d8235) as part of #59 added a push_v1
variable but forgot to initialize it to TRUE in the case where v1 and v2 were being
pushed onto the M-stack. Similar code exists in op_fnquery.c but push_v1 is correctly
initialized there. The same fix is now done in op_fnreversequery.c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants