JPH10501083A - Method and system for calling a function from a program running in another environment - Google Patents

Method and system for calling a function from a program running in another environment

Info

Publication number
JPH10501083A
JPH10501083A JP8520267A JP52026795A JPH10501083A JP H10501083 A JPH10501083 A JP H10501083A JP 8520267 A JP8520267 A JP 8520267A JP 52026795 A JP52026795 A JP 52026795A JP H10501083 A JPH10501083 A JP H10501083A
Authority
JP
Japan
Prior art keywords
function
request
environment
computer program
functions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP8520267A
Other languages
Japanese (ja)
Other versions
JP2982976B2 (en
Inventor
マー、アンソン
ブレーデイー、マイケル
Original Assignee
インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン filed Critical インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン
Publication of JPH10501083A publication Critical patent/JPH10501083A/en
Application granted granted Critical
Publication of JP2982976B2 publication Critical patent/JP2982976B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)
  • Stored Programmes (AREA)

Abstract

(57)【要約】 第1プログラミング言語で記述され、第1環境内で実行されるように設計されたコンピュータ・プログラム関数211、212を、第2プログラミング言語で記述され、第1環境内で実行不能であるコンピュータ・プログラム220からの要求として呼び出すことができるようにする方法を開示する。コンピュータ・プログラム220は、要求を供給し、その動作の中断および再開の能力を有する。要求は、待ち行列206に置かれ、第1環境で走行するスレッド204によって待ち行列206から除去される。コンピュータ・プログラム220が必要な環境を提供しないので、関数211、212をコンピュータ・プログラム220によって実行することはできない。 (57) Abstract: Computer program functions 211 and 212 written in a first programming language and designed to be executed in a first environment are written in a second programming language and executed in the first environment. A method is disclosed that allows it to be invoked as a request from a computer program 220 that is not possible. The computer program 220 supplies the request and has the ability to suspend and resume its operation. Requests are placed in queue 206 and removed from queue 206 by thread 204 running in the first environment. Functions 211 and 212 cannot be executed by computer program 220 because computer program 220 does not provide the necessary environment.

Description

【発明の詳細な説明】 別の環境で走行するプログラムから 関数を呼び出す方法およびシステム 発明の分野 本発明は、分散コンピューティングに関し、具体的には、Cプログラミング言 語で記述されず、C環境で実行されないコンピュータ・プログラムからの、Cプ ログラミング言語で記述された関数の呼出しに関する。さらに具体的に言うと、 本発明は、多重仮想記憶域(MVS)環境などのDCE(Distributed Computin g Environment、分散コンピューティング環境)以外の環境で走行するプログラ ムからのDCEサービスの使用に関する。発明の背景 分散コンピューティングにおける最近の進展が、OSF(Open Software Foun dation)のDCEの出現である。DCEの目的は、異機種計算機オペレーティン グ環境で、ある程度の透過的コンピューティングを提供することである。OSF は、C言語で記述されたポータブルなソース・コードと、このソース・コードの 移植を支援するための仕様を提供する。OSF DCEは、UNIX、MS−D OS、VMS、CRAYおよびSAA環境を含む多数のオペレーティング・シス テムに関して、使用可能であるか計画されている。その特徴には、共通の通信プ ロトコル、共通のシステム管理および共通のデータ・サービスが含まれる。具体 的に言うと、OSF DCEは、一般性を提供し、下記の主要な構成要素の統合 化を支援することを目的とする。 ・分散環境の複雑さを隠蔽するRPC(Remote Procedure Call,遠隔手続き呼 出し) ・位置、システム、ローカルな命名規則と独立に情報を使用するためのネーミン グ・ディレクトリ ・遠隔位置にあるファイルを透過的に使用するための分散ファイル・システム ・分散資源への許可されないアクセスを防止するためのセキュリテイ ・MS−DOSパーソナル・コンピュータによるDCEサービスへのアクセスを 提供するのを助けるPC統合化 ・システム管理機能 上で述べたように、DCEはC言語で記述され、OSFによってUNIXオペ レーティング・システム上で開発された。 MVSは、IBM Corporation社のシステム/370およびシス テム/390メインフレーム・コンピュータ上で走行するオペレーティング・シ ステムである。MVSは、これらの計算機用のアセンブラ(Asm)で記述され ている。 ほとんどのDCE関数はC言語で記述されているので、C で記述されたアプリケーションから簡単に呼び出すことができる。これらの関数 は、Cプログラム内の「main」関数の存在によって駆動されるCライブラリによ って確立された「C環境」から呼び出されることが想定されている。 「C環境」およびCプログラミング全般に関する情報は、カーニハン(B.W.K ernighan)およびリッチー(D.M.Ritchie)著、「The C Programming Language : Second Edition」、1988年、Prentice Hall刊(邦題「プログラミング言 語C第2版」、石田晴久訳、共立出版)に記載されている。 DCE関数では、アプリケーションが、リンクの慣例、スタックおよび回復ル ーチン群の使用法ならびに関数へ引数またはパラメータを渡す方法として期待さ れるものも含めて、この「C環境」で走行することが前提になっている。パラメ ータ渡しの相違を、異なる環境の例としてこれから説明する。 C関数では、パラメータが「値渡し」を使用して渡されると想定されている。 値渡しの場合、呼び出される関数には、元々の変数ではなく一次変数でパラメー タの値が与えられる。呼び出された関数は、呼出し元の関数の変数の値を直接に 変更することはできず、呼び出された関数の私的な一時コピーを変更することし かできない。呼出し元の関数の変数を変更する必要がある場合には、呼出し元が 、変更される変数のアドレスを提供しなければならず、呼び出される関数では、 そのパラメータをポインタとして宣言し、それを介して間接的に変数にアクセス しなければならない。 MVSでは、「参照渡し(call by reference)」を使用して関数に引数が渡 されると想定されている。参照渡しの場合、呼び出されるルーチンは、局所コピ ーではなく元々のパラメータへのアクセス権を有する。 Cで記述されていないアプリケーション、特に、370アセンブラで記述され たアプリケーションは、DCE関数で期待される環境を提供しない。システム/ 370コンピュータ用に記述されたこのようなアプリケーションの1例が、IB M Corporation社のCICS系列のトランザクション処理ソフトウ ェアである。 この問題は、上ではDCE関数に関して述べたが、C言語で記述された関数に アクセスしようとする、C言語で記述されていないすべてのソフトウェアについ ても存在する。 ある環境から別の環境の関数を呼び出すという問題に対する以前の解決は、特 定の環境と特定のアプリケーションに関する問題の解決を対象としてきた。すな わち、Cで記述された関数を呼び出す非Cアプリケーションの問題に対する一般 的な解決を提供しようとする試みはなかった。これらの解決には、C関数にとっ てC環境にみえるものを用意するためにまずセットアップ・ルーチンを呼び出す 非C呼出し元ルーチンが含まれる。その後、C関数が呼び出され、完了時に、非 C呼出し元ルーチンは、C関数の結果を集め、エラー状態などを解決するために 、クロージング・ルーチンを呼び出さなければならない。このような解決は、環 境設定のオーバーヘ ッドがあるので性能が低く、プログラミングが複雑でエラーも多い。 したがって、2つの環境(「C環境」と「非C環境」)の間のブリッジとして のインターフェースを提供して、特定の環境と特定のアプリケーションのための 特別のコードを必要とせずにDCEサービスを非DCE環境からアクセスできる ようにすると有利である。 環境間の以前のインターフェースは、ブートストラップ・モジュールまたは初 期設定モジュールにかなりの量のプログラミング・ロジックを有する。これらの 初期設定モジュールは、通常は、別の環境でその関数を利用しようとするアプリ ケーション(利用側)によって、メモリなどの資源を割り振られる。これらのイ ンターフェースは、利用側アプリケーションを停止させなければ簡単には停止さ せることができない。したがって、利用側アプリケーションを停止させずに異な る特性によってインターフェースをリフレッシュすることは不可能である。遮断 の後に、カスタマイズ・ファイルを使用して調整された異なる特性を有する状態 で再始動できるインターフェースを提供すると有利である。発明の開示 したがって、本発明は、第1プログラミング言語で記述され、第1環境で実行 されるように設計されたコンピュータ・プログラム関数を、第2プログラミング 言語で記述され、第 1環境で実行することができず、要求を供給し、動作の中断および再開の能力を 有するコンピュータ・プログラムから、要求として呼び出せるようにする方法で あって、前記第1環境で走行するスレッドを作成するステップと、前記要求のた めの待ち行列を提供するステップと、コンピュータ・プログラムから要求を受け 取るステップと、要求を待ち行列に置くステップと、スレッドによって前記要求 を待ち行列から除去するステップと、スレッド内で関数をロードし、実行するス テップとを含む方法を提供する。 好ましい実施例では、アプリケーション・プログラム自体が実行を継続する前 に関数が実行を完了するのをアプリケーション・プログラムが待つのではなく、 前記待ち行列に置くステップの後に、コンピュータ・プログラムを中断するステ ップと、前記実行するステップの後に、関数の完了時にコンピュータ・プログラ ムを再開するステップとが、この方法にさらに含まれる。アプリケーション・プ ログラムは、関数が実行を完了するのを待っている間に、処理を継続することが できる。 また、好ましい実施例では、第1プログラミング言語がCプログラミング言語 であり、第1環境がCプログラミング環境である。 この方法では、要求時に関数を個別にロードすることができるが、好ましい実 施例では、複数の関数が、関数のモジュールで提供され、関数のモジュールをロ ードした後、関数の 実行の前に、要求された関数のアドレスが、関数のモジュールから取得され、実 行するステップが、取得されたアドレスの呼出しからなる。関数のモジュールを 使用することによって、たとえば、セキュリティに関連するDCE関数などの関 数を単一モジュールに集め、その結果、ロードするステップの性能が向上すると いう長所がもたらされる。また、好ましい実施例では、複数のスレッドが用意さ れ、これらの複数のスレッドは、単一の待ち行列から要求を除去し、共通の関数 を共用する。やはり、複数のスレッドを使用して要求の処理のスループットを改 善することによって、性能が向上する。 好ましい実施例では、関数は、Cで記述されたDCE関数であり、アセンブラ (Asm)で記述されたコンピュータ・プログラムは、MVS環境で走行する。 本発明は、Cプログラミング言語で記述されたコンピュータ・プログラム関数 を、Cプログラミング言語で記述されず、C環境で実行されず、要求を供給し、 動作の中断および再開の能力を有するコンピュータ・プログラムからの要求とし て呼び出せるようにするためのデータ処理システムであって、C環境で走行する スレッドを作成するための手段と、要求のための待ち行列手段と、コンピュータ ・プログラムから要求を受け取るための手段と、待ち行列手段に要求を置くため の手段と、コンピュータ・プログラムを中断するための手段と、スレッドによる 待ち行列手段からの前記要求の除去のための手段と、スレッド内での関数のロー ドおよび実行のための手 段と、関数の完了時にコンピュータ・プログラムを再開するための手段とを含む システムも提供する。図面の簡単な説明 本発明の実施例を、例として示す添付の図面を参照して説明する。 第1図は、本発明のインターフェースのブロック図である。 第2図は、第1図のインターフェースの初期設定動作の流れ図である。 第3図は、第1図のインターフェースの要求処理動作の流れ図である。発明の詳細な説明 C言語で記述されたプログラムは、通常は、複数のプログラム内での使用のた めに記述された、プログラム内またはプログラミング片内で共通して使用される プログラミング片が、プログラミング片の出現ごとにプログラムのソース(人間 可読)コード内で完全にリストされないように構造化される。このようなプログ ラミング片を、関数と称し、ソース・コード内にこれらが現れる位置には、関数 の名前の参照だけがある。関数は、プログラム内の後方で完全にリストすること ができ、もしくは、ライブラリ内で完全にリストすることができ、このライブラ リは、後程プログラムをコンパイルする時またはプログラムをリンクする時に参 照される。関数のリス ティングは、独立のプログラムではなく、完全なプログラムから呼び出される必 要がある。 DCE関数 例1に、MVS環境から呼び出されることが所望されるDCE関数sec_login_ setup_identity()を示す。C関数の使用に精通している者であれば、例1に、関 数の実際のプログラミング・コードではなく、関数と入出力パラメータの使用の 構文が示されていることに気付くであろう。この関数の目的は、ユーザのネット ワーク識別を設定することである。この関数は、認証されたネットワーク動作を 実行するのに必要な局所環境のすべてを作成する。しかし、局所オペレーティン グ・システム環境は全く確立されず、したがって、呼出し元ルーチンによってそ のような環境が確立されることが期待される。この動作によって設定されるネッ トワーク識別は、もう1つのDCE関数sec_login_validate_identity()によっ て検証されるまでは使用できない。この関数および他のDCE関数に関する情報 は、「OSF DCE Appllcation Development Reference」、1993年、Prentice Hall刊に記載されている。 この関数の入力パラメータは次のとおりである。 principal 呼出し元プロセスに対応するレジストリ・アカウント上のPrinc ipal名を含む文字列を示すポインタ。 flags 新しいネットワーク信任状(credential)の使用方法に関する 情報を含むフラグの組。 この関数の出力パラメータは次のとおりである。 login_context ログイン・コンテキスト・データへの非透過的ハンドルを指 すポインタ。 status 完了状況を指すポインタ。 本発明のインターフェースは、DCE関数が期待する環境の設定に使用され、 また、必要な入出力パラメータの受け渡しに使用される。 Interface(インターフェース)の概要 このインターフェースは、非DCE環境とDCE環境の間のブリッジとして説 明できる。非DCE環境で走行するコード(Throwerコード)は、DCE要求を 作成する。このインターフェースの利用側(アプリケーション・プログラムなど )は、「Throwerコード」と、DCE環境で走行する対応する「Catcherコード」 の両方を提供する。このインターフェースは、ThrowerコードからCatcherコード へ制御を渡し、CatcherコードからThrowerコードへ制御を返すための機構を提供 する。このインターフェースを用いると、あらゆる種類と内容のパラメータを、 ThrowerコードとCatcherコードの間で渡せるようになり、また、C環境で走行す ることを期待するCatcherコードがC環境で走行することが保証される。 利用側によって供給される「Throwerコード」は、利用側コードが走行する特 定の非DCE環境用に記述される。この利用側記述コードに要求される機能は、 次のとおりである。 1.Bootstrap(ブートストラップ)モジュールのロードとこのモジュールへの 分岐 2.SUSPEND(中断)関数とRESUME(再開)関数の提供 3.Request Control Block(要求制御ブロック)の作成とInterfaceモジュール ・コードへの分岐 利用側が供給する「Catcher」コードは、非DCE環境が利用しようとする「 C」関数群であり、これらの関数へのエン トリ・ポイントを提供するためのヘッダを有する。このコードは、「fetchable (取出可能)」コンパイラ・オプション付きでコンパイルされるが、このオプシ ョンは、関数の実行が要求される場合、その時に、MVSオペレーティング・シ ステムが、その関数をメモリにロードでき、モジュールの大きさ、そのエントリ ・ポイントの場所などの情報を実行時に発見できることを意味する。しかし、M VSは、C環境が欠けているので、スタブ・モジュールを直接に呼び出すことは できない。 Interface構成要素 本発明のインターフェースは、多数のソフトウェア・パートからなり、これら のパートは、表1に一覧を示されたインターフェース初期設定に使用されるもの と、表2に一覧を示された要求処理に使用されるものに分割される。これらのパ ートの一部を、第1図に示す。 Interface初期設定 ここで第2図の流れ図を参照して、インターフェースの実施例の動作を、イン ターフェースの初期設定から説明する。 ステップ301で、Throwerコード220が、Bootstrapモジュール(第1図に は図示せず)をメモリにロードし、このモジュールに分岐する。ステップ302 で、Bootstrapモジュールが、Parameter List(パラメータ・リスト)を読み取 って、Bootstrapモジュールの動作をカストマイズする。Parameter Listには、 インターフェースをカストマイズするパラメ ータが含まれる。通常のParameter Listに含まれるパラメータを、表3に示す。 受け取った要求を処理するDCEスレッド204の数は、Parameter Listのパ ラメータである。このインターフェースが一時に処理する要求の最大サイズであ る要求待ち行列206の最大サイズも、Parameter Listに含まれる。 このインターフェースを異なる要件に合わせて調整またはカストマイズするた めに、ロードされるメインのInterfaceモジュール202を含むライブラリが、P arameter Listに含まれる。この調整は、後で説明する。 DCE環境で実行されるStubモジュール210をそこから ロードすることのできるライブラリは、Parameter Listに含まれる必要がある。 やはり、これを使用してこのインターフェースを調整またはカストマイズするこ とができる。頻繁に使用されるStubモジュール210は、ディスク記憶装置など へのアクセスなしに使用できるように、初期設定処理の一部として事前ロードす ることができる。このようなStubモジュール210の名前は、Parameter Listに 含まれる。 第2図の流れ図を参照すると、ステップ303で、Bootstrapモジュールがメ インのInterfaceモジュール202をロードする。ステップ304で、Bootstrap モジュールは、DCEスレッド204を作成することによって、メインのInterf aceモジュール202に制御を渡す。ステップ305で、Throwerコード220が 、Throwerコード220の「待機」に使用されるSUSPEND出口のアドレスと、Thro werコード220の「再開」に使用されるRESUME出口のアドレスとをInterfaceモ ジュール202に供給する。ステップ306で、Interfaceモジュール202は 、Throwerコード220からの要求を引数にして呼び出すことができるエントリ ・ポイントを、Throwerコード220に返す。 インターフェースの実施例の変形では、非同期初期設定が使用される。この場 合、初期設定が完了する前に、Throwerコード220に制御が返される。これに よって、Throwerコード220が、DCE環境が完全に確立されるのを待ちなが ら長期間拘束される必要がなくなる。 システム再始動か、インターフェース特性を変更するために異なるParameter Listを用いる再始動が要求されたかのいずれかの理由でインターフェースが再始 動されない限り、Bootstrapモジュールは、これ以上の目的のためには働かない 。 要求の処理 ここで第3図の流れ図を参照して、このインターフェースによる要求の処理を 説明する。ステップ401で、Throwerコード220がRequest Control Blockを 作成する。Request Control Blockは、インターフェースに要求を渡すのに使用 される。表4に、通常のRequest Control Blockの内容を示す。 ステップ402で、Throwerコード220が、実行が所望されるスタブ関数に 関する情報を含むRequest Control Blockを 指すポインタを引数にして、Interfaceモジュール202のエントリ・ポイント を呼び出す。ステップ403で、Interfaceモジュール202が、要求をFIF Oの要求待ち行列206に置く。ステップ404で、Interfaceモジュール20 2が、使用可能なDCEスレッド204にその要求を処理するように通知する。 ステップ405で、Interfaceモジュール202が、SUSPEND出口を呼び出す。こ のSUSPEND出口のアドレスは、ステップ305でThrowerコードによって供給され ている。 ステップ406で、通知されたDCEスレッド204が、FIFOの要求待ち 行列206から要求を除去する。ステップ407で、DCEスレッド204が、 ステップ402でThrowerコードによって供給されたポインタを使用してRequest Control Blockをアドレッシングする。ステップ408で、DCEスレッド20 4が、Request Control Blockから、スタブ関数211、212のIDとそれを 含むStubモジュール210の名前を判定する。ステップ409で、Stubモジュー ル210がまだロードされていない場合には、これをロードし、そのエントリ・ ポイントを記録する。Stubモジュール210がすでにロードされている場合、ス テップ411に進む。 Cで記述された1つまたは複数のスタブ関数211、212を含むStubモジュ ール210は、関数番号を引数にして呼び出すことができるエントリ・ポイント を有し、このエントリ・ポイントは、要求された関数の直接エントリ・ポイント を呼出し元に返す。Stubモジュールは、fetchableオプション 付きでコンパイルされるが、これは、関数の実行が要求される場合、その時に、 MVSオペレーティング・システムがその関数をメモリにロードでき、モジュー ルの大きさ、エントリ・ポイントの位置などの情報を実行時に発見できることを 意味する。しかし、MVSは、C環境が欠けているのでStubモジュールを直接に 呼び出すことができない。このようなstubモジュール210の例を、例2に示す 。 このコードには、必要な関数番号を引数にして、最初のエントリ・ポイント( EUVQLKUP)から進入する。このコードは、指定された関数番号のエントリ・ポイ ントが見つからない場合にはnull表示、そうでない場合にはその関数のエントリ ・ポイントを戻り値として終了する。 Stubモジュール210に含まれるスタブ関数211、212のそれぞれには、 これ以外のエントリ・ポイントがある。例では、これらを「stub_functionlのエ ントリ・ポイント」、「stub_function2のエントリ・ポイント」として示す。 ステップ411で、DCEスレッド204が、スタブ関数211、212のI Dを引数にしてStubモジュールのエントリ・ポイントを呼び出す。ステップ41 2で、Stubモジュール210が、ステップ411の呼出しからリターンし、要求 されたスタブ関数211、212のエントリ・ポイントをDCEスレッド204 に返す。 ステップ413で、DCEスレッド204が、通常のC関数を呼び出すのと同 じ形でスタブ関数211、212を呼び出し、Throwerコード220によって渡 された4バイト値からなる単一のパラメータを渡す。ステップ414で、スタブ 関数211、212が、「C」環境を有するDCEスレッド204内で走行し、 Throwerコード220から渡された4バイト値を介して、ThrowerのParameter Li stにアクセスする。ステ ップ415で、スタブ関数211、212が、必要なDCE関数を呼び出し、ス テップ416で、適当な戻りパラメータに結果を置き、ステップ413でこれを 呼び出したDCEスレッド204にリターンする。 ステップ417で、DCEスレッド204が、初期設定のステップ305でア ドレスを渡されたRESUME出口を呼び出す。ステップ418で、RESUME出口が、M VS POSTマクロを使ってThrowerタスクを覚醒させることによって、DC E要求が完了したことを待機中のThrowerタスクに示す。ステップ419で、新 たに覚醒されたThrowerコード220が、DCEスレッド204を休眠させ、Int erfaceモジュール202からの要求処理を求める別の要求を待つ。ステップ42 0で、Throwerコードが、ステップ405で進入したSUSPEND出口からリターンし 、Interfaceモジュール202に制御を渡し、ステップ421で、Interfaceモジ ュール202が、要求が完了したことを知らせ、ステップ402で開始された呼 び出しからリターンする。 初期設定中にこのインターフェースを調整する能力を、これから説明する。 インターフェースの調整 非DCE環境で走行するコードは、このインターフェースを遮断し、初期設定 コードを呼び出すことによって、再始動することができる。これを行う場合には 、異なるParameter Listを指定することによって、異なる版のインターフェースをロードすることが できる。表3に、Parameter Listの内容の例を示す。この遮断と再始動は、たと えば、Throwerタスク(アプリケーション・プログラム)を走行状態に保ちなが ら、更新された版のインターフェースを導入し、したがって、Throwerタスクの 可用性を最大にする時に望ましい。 要求の取消(cancel) 上で述べたように、Throwerコード220は、Interfaceモジュール202がTh rowerコード220の中断と再開を行うためのアドレス(SUSPENDとRESUME)を供 給する。要求が、Interfaceモジュール202によって受け取られ、要求待ち行 列206に置かれてDCEスレッド204による処理を待っている状態になった ならば、SUSPEND出口が呼び出され、利用側は、要求が完了した時までThrowerコ ード220を待つのに必要なすべての処置を行う。要求が待ち行列化された時か ら、要求が完了したことをDCEスレッド204が示すまで、DCEスレッド2 04の下で走行するStubモジュール210(「Catcher」コード)は、Throwerコ ード220によって供給されたパラメータ記憶域のいずれかをアクセスする可能 性を有する。 システム一貫性の必要があるので、Throwerコード220に属するパラメータ 記憶域は、Stubモジュール210の「Catcher」コードのすべてがそれにアクセ スしようとしないことが 明白になるまで、解放することも再割振りすることもできない。このことから、 Throwerコード220が要求の完了を待っている間に、Throwerコード220を終 了し、その記憶域を解放する必要がある場合に問題が発生する。さらに、DCE 環境での要求の取消は、非同期事象であるから、Throwerコード220が、まだ 走行中の要求に関するDCE取消を発行する場合であっても、洗練された同期化 ロジックがなければ、Throwerコード220は、要求が終了したか否かを知らな いはずである。 この問題を克服するために、DCEスレッド204の下で走行するStubモジュ ール210の「Catcher」コードがまだ走行している可能性がある場合であって も、Throwerコード220を除去できるようにする、プロトコルと一連の関数が 使用される。このプロトコルのほかに、この解決に本質的に含まれるのは、Inte rfaceモジュール202による「除去ウィンドウ」ロック機能の提供である。こ の機能によって、Stubモジュール210の「Catcher」コードが前のDCE要求 を取り消す要求を受け入れることができるか否かを示すための手段が提供される 。 除去プロトコル このプロトコルに適合するために、Throwerコード220は、SUSPEND出口の中 にいる場合に、パラメータ記憶域を解放する前に、まずInterfaceモジュール2 02から「同意」を得なけ ればならないことを保証しなければならない(たとえば、除去の処理中)。この 「同意」は、Interfaceモジュール202に取消要求を発行することによって得 られる。取消要求からの応答が満足なものである場合、Throwerコード220は 、除去を進めることができる。しかし、応答が満足でない場合、Throwerコード 220は、進行してはならない。この場合、Throwerコード220は、ある時間 だけ待った後に、取消要求を再試行することが好ましい。 Stubモジュール210の「Catcher」コードは、排除プロトコルに適合しなけ ればならない場合には、例3に示されるような構造になっていなければならない 。Stubモジュール210の「Catcher」コードは、「非取消」ウィンドウ内にあ るのでなければ、取消の候補とみなされる。Stubモジュール210の「Catcher 」コードは、setcancel関数を呼び出して取消をオフにセットしなければならな いことを指定することによって、そのようなウインドウに入ろうとしていること をInterfaceモジュール202に知らせる。同様に、Stubモジュール210の「C atcher」コードは、「Thrower」記憶域からまたはそこへのコピーを完了したな らば、setcancel(ON)関数を呼び出すことによってこれを取り消すことができる ことを示す。 好ましい実施例では、「Compare and Swap(比較と交換)」命令を使用して、 Stubモジュール210の「Catcher」コードの取消状況の変更が、Throwerコード 220とStubモジュール210の「Catcher」コードの間で同期化されることを 保証する。たとえば、setcancel(OFF)が発行される「前」に、インターフェース が取消要求を受け取り、処理する場合、その要求は、取消済みとしてマークされ 、Throwerコードは、そのパラメータ記憶域の解放を許可される。Stubモジュー ル210の「Catcher」コードによる後続のsetcancel(OFF)の呼び出しは、その 要求の取消をもたらし、Stubモジュール210の「Catcher」コードがこの事象 をトラップする回復ロジックを 有するのでない限り、制御は絶対にStubモジュール210の「Catcher」コード には戻らない。 しかし、Stubモジュール210の「Catcher」コードのsetcancel(OFF)要求が 処理された「後」にThrowerコード220の取消要求が処理される場合には、Stu bモジュール210の「Catcher」コードの要求は、「取消不能」としてすでにマ ークされており、Throwerコード220の取消要求は失敗する。DETAILED DESCRIPTION OF THE INVENTION                     From a program running in another environment                     Methods and systems for calling functions Field of the invention   The present invention relates to distributed computing, and in particular, to the C programming language. C program from a computer program that is not written in It relates to calling functions written in the programming language. More specifically, The present invention relates to a distributed computing (DCE) such as a multiple virtual storage (MVS) environment. g Environment, a distributed computing environment) The use of DCE services from the system.Background of the Invention   Recent advances in distributed computing have been driven by the Open Software Fountain System (OSF). dation) of the DCE. The purpose of DCE is to operate a heterogeneous computer To provide some degree of transparent computing in a virtual environment. OSF Is a portable source code written in C language and this source code Provide specifications to support porting. OSF DCE is UNIX, MS-D Multiple operating systems including OS, VMS, CRAY and SAA environments Available or planned for the system. Its features include a common communication protocol. Protocols, common system administration and common data services. Concrete In general, the OSF DCE provides generality and integrates the following key components: The purpose is to support the conversion. ・ Remote Procedure Call (RPC) that hides the complexity of a distributed environment broth) Naming to use information independently of location, system, local naming conventions Directory ・ Distributed file system for transparent use of remote files Security to prevent unauthorized access to distributed resources ・ Access to DCE service by MS-DOS personal computer PC integration to help provide ・ System management function   As mentioned above, DCE is written in C language, and UNIX operating system Developed on a rating system.   MVS is an IBM Corporation System / 370 and System Operating system running on a system / 390 mainframe computer Stem. MVS is described in an assembler (Asm) for these computers. ing.   Since most DCE functions are written in C language, It can be easily called from the application described in. These functions Is based on the C library driven by the presence of the "main" function in the C program. It is assumed that it is called from the “C environment” established in this way.   For information on the "C environment" and C programming in general, see Kernighan (B.W.K.) ernighan) and D.M. Ritchie, "The C Programming Language : Second Edition ”, 1988, published by Prentice Hall (Japanese title“ Programming Word C Second Edition ", translated by Haruhisa Ishida, Kyoritsu Shuppan).   In the DCE function, the application uses the link conventions, stack and recovery rules. It is expected to use routines and pass arguments or parameters to functions. It is assumed that the vehicle travels in the "C environment", including those that can be used. parameter The differences in data passing will now be described as examples of different environments.   In the C function, it is assumed that the parameters are passed using "pass by value". With pass-by-value, the called function must be parameterized with primary variables instead of the original variables. Data value. The called function directly returns the value of the variable of the calling function. It cannot be changed, and it is necessary to change a private temporary copy of the called function. I can't do it. If the calling function's variables need to be changed, the calling , You must provide the address of the variable to be changed, and in the function called Declare that parameter as a pointer and access the variable indirectly through it Must.   MVS uses “call by reference” to pass arguments to functions. It is assumed to be. For pass-by-reference, the called routine is -Has access to the original parameters but not the original.   Applications not written in C, especially those written in 370 assembler Applications do not provide the environment expected by DCE functions. system/ One example of such an application written for a 370 computer is the IB Transaction processing software of CICS Corporation of M Corporation It is.   This problem was described above with respect to the DCE function, but the function written in C language has For all software not written in C that you want to access, Even exists.   Earlier solutions to the problem of calling a function from one environment to another are notable. It has been aimed at solving problems with certain environments and specific applications. sand In other words, general to the problem of non-C applications that call functions written in C There have been no attempts to provide a strategic solution. To solve these, the C function Call setup routine first to prepare what looks like C environment Includes non-C caller routines. Then, the C function is called, and upon completion, The C calling routine collects the results of the C function and resolves the error condition etc. , The closing routine must be called. Such a solution Oversight of border setting The performance is low due to the presence of the code, the programming is complicated and there are many errors.   Thus, as a bridge between two environments ("C environment" and "non-C environment") Provides an interface for specific environments and specific applications DCE services can be accessed from non-DCE environments without the need for special code This is advantageous.   The previous interface between the environments was the bootstrap module or the initial The initialization module has a significant amount of programming logic. these The initialization module is typically used by apps that try to use the function in another environment. Applications (users) allocate resources such as memory. These The interface can easily be stopped without stopping the consuming application. I can't let it. Therefore, without stopping the using application, It is not possible to refresh the interface with certain characteristics. Cut off Followed by states with different characteristics adjusted using a customization file It would be advantageous to provide an interface that can be restarted atDisclosure of the invention   Thus, the present invention is written in a first programming language and runs in a first environment. A computer program function designed to be Written in the language Cannot execute in one environment, supply requests, and suspend and resume operations. In a way that can be called as a request from a computer program that has Creating a thread that runs in the first environment; Providing a queue for receiving a request from a computer program. Taking and queuing the request; and De-queuing and loading and executing functions within the thread. And a method comprising:   In the preferred embodiment, before the application program itself continues execution Instead of the application program waiting for the function to complete execution, Interrupting the computer program after the queuing step. And after the executing step, upon completion of the function, the computer program Restarting the system is further included in the method. Application P The program may continue processing while waiting for the function to complete execution. it can.   In a preferred embodiment, the first programming language is a C programming language. And the first environment is a C programming environment.   This method allows the functions to be loaded individually on demand, but is preferred In the example, a plurality of functions are provided in a function module, and the function module is loaded. After loading the function, Before execution, the address of the requested function is obtained from the function module and The step of executing comprises a call to the obtained address. Function module It can be used, for example, to associate security-related DCE functions, etc. If the numbers are collected in a single module and the performance of the loading step improves, The advantage is brought. Also, in the preferred embodiment, multiple threads are provided. These multiple threads remove requests from a single queue and share a common function. To share. Again, use multiple threads to improve the throughput of processing requests. Better performance improves performance.   In the preferred embodiment, the function is a DCE function written in C and the assembler The computer program described in (Asm) runs in an MVS environment.   The present invention relates to a computer program function written in the C programming language. Is not written in the C programming language, is not executed in the C environment, supplies a request, Request from a computer program capable of suspending and resuming operation A data processing system for calling and calling in a C environment Means for creating threads, queuing means for requests, and computer .Means for receiving requests from programs and for placing requests in queue means Means for interrupting the computer program, and means for interrupting the computer program. Means for removing the request from the queuing means, and loading of the function within the thread. And hands for execution Including steps and means for resuming the computer program upon completion of the function A system is also provided.BRIEF DESCRIPTION OF THE FIGURES   Embodiments of the present invention will be described with reference to the accompanying drawings shown as examples.   FIG. 1 is a block diagram of the interface of the present invention.   FIG. 2 is a flowchart of an initial setting operation of the interface shown in FIG.   FIG. 3 is a flowchart of a request processing operation of the interface of FIG.Detailed description of the invention   A program written in the C language is usually used for multiple programs. Commonly used in a program or a piece of programming written for The programming fragment is the source of the program (human (Readable) Structured so that it is not completely listed in the code. Such a blog The ramming fragments are called functions, and where they appear in the source code, There is only a name reference. Functions should be listed completely later in the program Or you can list them completely in the library. Later, when compiling the program or linking the program. Illuminated. Squirrel of functions Must be called from a complete program, not a standalone program. It is necessary. DCE function   Example 1 includes a DCE function sec_login_ that is desired to be called from the MVS environment. Show setup_identity (). If you are familiar with using C functions, Use of functions and input / output parameters, rather than the actual programming code You will notice that the syntax is shown. The purpose of this function is to This is to set the work identification. This function checks the authenticated network operation. Create all of the local environments needed to run. But topical operating No system environment is established at all, and therefore it is not It is expected that such an environment will be established. The network set by this operation Network identity is determined by another DCE function, sec_login_validate_identity (). Not usable until verified. Information about this and other DCE functions Is "OSF DCE Appllcation Development Reference", 1993, Prentice It is described in Hall. The input parameters for this function are as follows:   principal Prince on the registry account corresponding to the calling process Pointer to a string containing the ipal name.   flags on how to use the new network credentials A set of flags containing information. The output parameters of this function are as follows:   login_context Points to an opaque handle to login context data. Pointer.   status Pointer to completion status.   The interface of the present invention is used to set the environment expected by the DCE function, It is also used for passing necessary input / output parameters. Interface overview   This interface is described as a bridge between non-DCE and DCE environments. I can tell. A code that runs in a non-DCE environment (Thrower code) create. User of this interface (application program, etc.) ) Indicates the "Thrower code" and the corresponding "Catcher code" that runs in the DCE environment. Provide both. This interface converts Thrower code to Catcher code Provides a mechanism for passing control to the Catcher code and returning control to the Thrower code I do. With this interface, all types and content parameters can be You can now pass between Thrower code and Catcher code, and drive in C environment. It is guaranteed that the Catcher code expecting to run in the C environment.   The "Thrower code" supplied by the user side is the special Described for certain non-DCE environments. The functions required for this user-side description code are: It is as follows. 1. Loading the Bootstrap module and loading it Branch 2. Provide SUSPEND and RESUME functions 3. Creating Request Control Block and Interface Module Branch to code   The "Catcher" code supplied by the user side is the "Catcher" code that the non-DCE environment tries to use. C "function group, and Has a header to provide tri points. This code is "fetchable Compiled with the "(extractable)" compiler option. If the function execution is required, then the MVS operating system System can load the function into memory, the size of the module, its entry -It means that information such as the location of points can be found at the time of execution. But M The VS lacks the C environment so calling the stub module directly Can not. Interface components   The interface of the present invention consists of a number of software parts, The parts of are used for the interface initialization listed in Table 1. And those used for request processing listed in Table 2. These A portion of the seat is shown in FIG. Interface initial settings   Referring now to the flowchart of FIG. 2, the operation of the embodiment of the interface will be described. The description starts with the initial setting of the interface.   In step 301, the Thrower code 220 is executed by the Bootstrap module (see FIG. 1). (Not shown) into memory and branch to this module. Step 302 So, the Bootstrap module reads the Parameter List Thus, the operation of the Bootstrap module is customized. The Parameter List contains Parameters to customize the interface Data is included. Table 3 shows parameters included in a normal Parameter List.   The number of DCE threads 204 that process the received request is determined by the parameters in the Parameter List. Parameters. The maximum size of a request that this interface will process at one time. The maximum size of the request queue 206 is also included in the Parameter List.   To tailor or customize this interface for different requirements The library containing the main Interface module 202 to be loaded is It is included in arameter List. This adjustment will be described later.   Stub module 210 executed in DCE environment from there Libraries that can be loaded must be included in the Parameter List. Again, use this to adjust or customize this interface. Can be. Frequently used Stub modules 210 include disk storage devices Preloaded as part of the initialization process so that it can be used without access to the Can be The name of such a Stub module 210 is included in the Parameter List. included.   Referring to the flowchart of FIG. 2, at step 303, the Bootstrap module The interface module 202 is loaded. In step 304, Bootstrap The module creates the DCE thread 204 to create the main Interface The control is passed to the ace module 202. In step 305, the thrower code 220 , The address of the SUSPEND exit used for "waiting" in the Thrower code 220 and the Thro Enter the address of the RESUME exit used for "restart" of the To the module 202. In step 306, the Interface module 202 , An entry that can be called with the request from the Thrower code 220 as an argument • Return the point to the Thrower code 220.   In a variant of the interface embodiment, asynchronous initialization is used. This place In this case, control is returned to the Thrower code 220 before the initialization is completed. to this Thus, the Thrower code 220 waits for the DCE environment to be fully established. No longer need to be detained.   Different parameters to restart system or change interface characteristics The interface is restarted either because a restart using the List was requested The Bootstrap module will not work for further purposes unless it is run . Request processing   Referring now to the flowchart of FIG. 3, the processing of a request by this interface will be described. explain. In step 401, the thrower code 220 creates a request control block. create. Request Control Block is used to pass requests to the interface Is done. Table 4 shows the contents of a normal Request Control Block.   In step 402, the Thrower code 220 converts the stub function Request Control Block containing information about Using the pointer to point as an argument, the entry point of the Interface module 202 Call. In step 403, the Interface module 202 Put it in O's request queue 206. In step 404, the interface module 20 2 notifies available DCE threads 204 to process the request. At step 405, the Interface module 202 calls the SUSPEND exit. This The address of the SUSPEND exit is supplied by the Thrower code in step 305 ing.   In step 406, the notified DCE thread 204 waits for a FIFO request. Remove the request from the queue 206. At step 407, the DCE thread 204 Request using the pointer supplied by the Thrower code in step 402  Address the Control Block. In step 408, the DCE thread 20 4. From the Request Control Block, the IDs of the stub functions 211 and 212 and the IDs The name of the included Stub module 210 is determined. In step 409, the Stub module If the file 210 is not already loaded, it is loaded and its entry Record points. If the Stub module 210 is already loaded, Proceed to step 411.   A Stub module including one or more stub functions 211, 212 written in C Rule 210 is an entry point that can be called with a function number as an argument. And this entry point is the direct entry point of the requested function To the caller. Stub module has fetchable option , Which means that if the execution of a function is required, The MVS operating system can load the function into memory That information such as file size and entry point location can be found at runtime. means. However, MVS lacks C environment, so Stub module is directly Cannot call. An example of such a stub module 210 is shown in Example 2. .   The code contains the required function number as an argument and the first entry point ( EUVQLKUP). This code is the entry point for the specified function number. Null if not found, entry for that function otherwise ・ End with the point as the return value.   Each of the stub functions 211 and 212 included in the Stub module 210 includes: There are other entry points. In the example, these are called "stub_functionl Entry point "and" stub_function2 entry point ".   In step 411, the DCE thread 204 determines whether the stub functions 211 and 212 Call the entry point of the Stub module with D as an argument. Step 41 At 2, the Stub module 210 returns from the call of step 411 and returns The entry points of the stub functions 211 and 212 To return.   In step 413, the same as when the DCE thread 204 calls a normal C function. Call stub functions 211 and 212 in the same form and pass Pass a single parameter consisting of the resulting 4-byte value. In step 414, the stub Functions 211 and 212 run in the DCE thread 204 having a "C" environment; Through the 4-byte value passed from the Thrower code 220, the Parameter Li Access st. Stay In step 415, the stub functions 211 and 212 call the necessary DCE functions and In step 416, place the result in the appropriate return parameter, and in step 413, The process returns to the called DCE thread 204.   In step 417, the DCE thread 204 executes the initialization in step 305 of the initialization. Call the RESUME exit passed the dress. In step 418, the RESUME exit By awakening the Thrower task using the VS POST macro, the DC The completion of the E request is indicated to the waiting Thrower task. In step 419, the new The awakened Thrower code 220 puts the DCE thread 204 to sleep, and Int It waits for another request from the erface module 202 for request processing. Step 42 At 0, the thrower code returns from the SUSPEND exit entered at step 405. , And passes control to the Interface module 202. At step 421, the The module 202 indicates that the request has been completed and the call initiated in step 402 Return from the jump.   The ability to adjust this interface during initialization will now be described. Adjusting the interface   Code running in a non-DCE environment will shut down this interface and initialize It can be restarted by calling the code. If you do this , Different Parameter By specifying a List, you can load different versions of the interface it can. Table 3 shows an example of the contents of the Parameter List. This shutdown and restart For example, while keeping the Thrower task (application program) running Introduced an updated version of the interface, thus Desirable when maximizing availability. Cancel request   As described above, the Thrower code 220 indicates that the Interface module 202 Provide addresses (SUSPEND and RESUME) for suspending and resuming rower code 220. Pay. A request is received by the Interface module 202 and the request queue Placed in column 206 and waiting for processing by DCE thread 204 If this is the case, the SUSPEND exit is called and the consumer continues to use the thrower until the request is completed. Perform all necessary actions to wait for code 220. When the request was queued Until the DCE thread 204 indicates that the request has been completed. The Stub module 210 ("Catcher" code) running under the 04 Can access any of the parameter storage provided by the code 220 Has the property.   Since there is a need for system consistency, the parameters belonging to the Thrower code 220 Storage is accessed by all of the “Catcher” code in the Stub module 210. Not to try Until it becomes clear, it cannot be released or reallocated. From this, Terminate the Thrower code 220 while the Thrower code 220 is waiting for the completion of the request. The problem arises when you need to free up that storage. In addition, DCE Since canceling a request in the environment is an asynchronous event, Sophisticated synchronization even when issuing DCE cancellations for running requests Without the logic, the Thrower code 220 does not know whether the request has been completed. Should be.   To overcome this problem, a Stub module running under the DCE thread 204 If the "Catcher" code in rule 210 may still be running Also has a protocol and a set of functions that allow the removal of the Thrower code 220 used. In addition to this protocol, inherent in this solution is Inte The rface module 202 provides a "remove window" lock function. This The "Catcher" code of the Stub module 210 is replaced by the previous DCE request A means is provided to indicate whether a request to revoke a request can be accepted . Removal protocol   To conform to this protocol, the Thrower code 220 must be in the SUSPEND exit. Interface module 2 before releasing the parameter storage. Get "agreement" from 02 Must be guaranteed (eg, during removal processing). this “Agree” is obtained by issuing a cancellation request to the Interface module 202. Can be If the response from the cancellation request is satisfactory, the Thrower code 220 , Removal can proceed. But if the response is not satisfactory, thrower code 220 must not proceed. In this case, the Thrower code 220 is It is preferable to retry the cancellation request after only waiting.   The “Catcher” code in the Stub module 210 must comply with the exclusion protocol. If not, the structure must be as shown in Example 3. . The “Catcher” code for the Stub module 210 appears in the “Uncancel” window. If not, it is considered a candidate for cancellation. "Catcher of Stub module 210 The code must call the setcancel function to set the cancellation off. Trying to enter such a window by specifying that To the Interface module 202. Similarly, "C" of the Stub module 210 The atcher code has completed copying from or to the Thrower storage. You can cancel this by calling the setcancel (ON) function Indicates that   In the preferred embodiment, using the "Compare and Swap" instruction, The change of cancellation status of "Catcher" code of Stub module 210 is changed by Thrower code Synchronization between the "Catcher" code of Stub module 210 and 220 Guarantee. For example, before “setcancel (OFF) is issued, If the request is received and processed, the request is marked as canceled. , Thrower code is allowed to free its parameter storage. Stub module A subsequent call to setcancel (OFF) by the "Catcher" code in This results in the cancellation of the request, and the "Catcher" code in the Stub module 210 Recovery logic to trap Unless you have control, the control is absolutely the "Catcher" code of the Stub module 210 Do not return to.   However, setcancel (OFF) request of “Catcher” code of Stub module 210 If the request to cancel the Thrower code 220 is processed “after” the processing, b The request for the “Catcher” code in module 210 has already been marked as “irrevocable”. And the request to cancel the thrower code 220 fails.

Claims (1)

【特許請求の範囲】 1.第1プログラミング言語で記述され、第1環境内で実行されるように設計さ れたコンピュータ・プログラム関数を、第2プログラミング言語で記述され、前 記第1環境内で実行不能であり、要求を供給し、その動作の中断および再開の能 力を有するコンピュータ・プログラムからの前記要求として呼び出すことができ るようにする方法であって、 前記第1環境内で走行するスレッドを作成するステップと、 前記要求のための待ち行列を提供するステップと、 前記コンピュータ・プログラムから前記要求を受け取るステップと、 前記要求を前記待ち行列に置くステップと、 前記スレッドによって前記待ち行列から前記要求を除去するステップと、 前記スレッド内で関数をロードし、実行するステップと を含む方法。 2.さらに、 前記待ち行列に置くステップの後に、前記コンピュータ・プログラムを中断す るステップと、 前記実行するステップの後に、関数の完了時に前記コンピュータ・プログラム を再開するステップと を含む、請求項1に記載の方法。 3.前記第1プログラミング言語が、Cプログラミング言語 であり、前記第1環境が、Cプログラミング環境であることを特徴とする、前記 請求項のいずれか一項に記載の方法。 4.複数の関数が、モジュールで提供され、前記関数をロードするステップが、 前記複数の関数を含むモジュールをロードするステップであることを特徴とする 、前記請求項のいずれか一項に記載の方法。 5.さらに、前記複数の関数を含むモジュールをロードした後、関数の実行の前 に、前記複数の関数を含むモジュールから要求された関数のアドレスを取得する ステップを含み、前記実行するステップが、取得されたアドレスの呼び出しによ ることを特徴とする、請求項4に記載の方法。 6.複数のスレッドが作成され、前記複数のスレッドが、単一の待ち行列からの 要求を除去し、共通の関数を共用することを特徴とする、前記請求項のいずれか 一項に記載の方法。 7.前記スレッドを作成するステップが、要求される関数をロードするステップ も含むことを特徴とする、前記請求項のいずれか一項に記載の方法。 8.前記関数が、DCE関数であることを特徴とする、前記請求項のいずれか一 項に記載の方法。 9.前記コンピュータ・プログラムが、MVS環境で走行することを特徴とする 、前記請求項のいずれか一項に記載の方法。 10.前記要求の提供が、要求データを指すポインタの提供を含むことを特徴と する、前記請求項のいずれか一項に記載 の方法。 11.前記スレッド内での関数の実行の前に、 関数を取り消してはならないことの表示をセットするように前記コンピュータ ・プログラムによって要求された場合に、関数を取り消してはならないことの表 示をセットするステップと、 前記コンピュータ・プログラムによって供給された必要なパラメータを、前記 コンピュータ・プログラムに割り振られた記憶域から、前記関数に割り振られた 記憶域へコピーするステップと、 前記関数を取り消してはならないことの表示をクリアするように前記コンピュ ータ・プログラムによって要求された場合に、前記関数を取り消してはならない ことの表示をクリアするステップと を含み、さらに、前記スレッド内での関数の完了の前に、 前記関数を取り消してはならないことの表示をセットするように前記コンピュ ータ・プログラムによって要求された場合に、前記関数を取り消してはならない ことの表示をセットするステップと、 前記関数によって供給された返されたパラメータを、前記関数に割り振られた 記憶域から、前記コンピュータ・プログラムに割り振られた記憶域へコピーする ステップと、 前記関数を取り消してはならないことの表示をクリアするように前記コンピュ ータ・プログラムによって要求された場 合に、前記関数を取り消してはならないことの表示をクリアするステップと を含む、前記請求項のいずれか一項に記載の方法。 12.第1プログラミング言語で記述され、第1環境で実行されるように設計さ れたコンピュータ・プログラム関数を、第2プログラミング言語で記述され、前 記第1環境で実行不能であり、要求を供給し、それ自体の動作の中断および再開 の能力を有するコンピュータ・プログラムからの前記要求として呼び出せるよう にするためのデータ処理システムであって、 C環境で走行するスレッドを作成するための手段と、 要求のための待ち行列手段と、 前記コンピュータ・プログラムから要求を受け取るための手段と、 前記待ち行列手段に要求を置くための手段と、 前記スレッドによって前記待ち行列手段から前記要求を除去するための手段と 、 前記スレッド内での関数のロードと実行のための手段と を含むシステム。 13.さらに、 前記コンピュータ・プログラムを中断するための手段と、 前記関数の完了時に前記コンピュータ・プログラムを再開するための手段と を含む、請求項12に記載のシステム。 14.前記第1プログラミング言語が、Cプログラミング言語であり、前記第1 環境が、Cプログラミング環境であることを特徴とする、請求項12または請求 項13に記載のシステム。 15.複数のスレッドが作成され、前記複数のスレッドが、単一の待ち行列手段 からの要求を除去し、共通の関数を共用することを特徴とする、請求項12ない し請求項14のいずれか一項に記載のシステム。 16.前記関数が、DCE関数であり、前記コンピュータ・プログラムが、MV S環境で走行することを特徴とする、請求項12ないし請求項15のいずれか一 項に記載のシステム。[Claims] 1. Written in a first programming language and designed to run in a first environment Computer program functions written in a second programming language, Not executable in the first environment, providing the request and suspending and resuming its operation. Can be called as said request from a powerful computer program Is a way to   Creating a thread that runs in the first environment;   Providing a queue for the request;   Receiving the request from the computer program;   Placing the request in the queue;   Removing the request from the queue by the thread;   Loading and executing a function within the thread;   A method that includes 2. further,   Suspending the computer program after the queuing step Steps   After the performing step, upon completion of the function, the computer program Steps to resume   The method of claim 1, comprising: 3. The first programming language is a C programming language Wherein the first environment is a C programming environment. A method according to any one of the preceding claims. 4. A plurality of functions are provided in a module, and the step of loading the functions comprises: Loading a module including the plurality of functions. A method according to any one of the preceding claims. 5. Further, after loading the module including the plurality of functions and before executing the functions. Obtains the address of the requested function from the module including the plurality of functions. And wherein the step of executing comprises retrieving the obtained address. The method according to claim 4, characterized in that: 6. A plurality of threads are created, wherein the plurality of threads are from a single queue. A method according to any of the preceding claims, wherein the request is eliminated and a common function is shared. A method according to claim 1. 7. Creating the thread comprises loading a required function The method according to any of the preceding claims, characterized in that it also comprises: 8. 2. The method according to claim 1, wherein the function is a DCE function. The method described in the section. 9. The computer program runs in an MVS environment A method according to any one of the preceding claims. 10. Providing the request includes providing a pointer to request data. Claims according to any one of the preceding claims. the method of. 11. Before executing the function in the thread,   Said computer to set an indication that the function must not be canceled A table that the function must not be canceled if requested by the program Setting the indication;   The necessary parameters supplied by the computer program, From the storage allocated to the computer program, Copying to storage;   The computer should clear the indication that the function must not be cancelled. Must not cancel the function if requested by the data program Steps to clear the display of things   And before completion of the function in the thread,   The computer to set an indication that the function must not be canceled Must not cancel the function if requested by the data program Setting an indication of that;   The returned parameters supplied by the function were allocated to the function Copy from storage to storage allocated to the computer program Steps and   The computer should clear the indication that the function must not be cancelled. Place requested by the data program Clearing the indication that the function must not be canceled,   The method of any one of the preceding claims, comprising: 12. Written in a first programming language and designed to run in a first environment Computer program functions written in a second programming language, Not executable in the first environment, serving the request, suspending and resuming its own operation Can be called as the request from a computer program having A data processing system for   Means for creating a thread that runs in a C environment;   Queuing means for the request;   Means for receiving a request from the computer program;   Means for placing a request in said queuing means;   Means for removing said request from said queuing means by said thread; ,   Means for loading and executing functions within the thread;   Including system. 13. further,   Means for interrupting the computer program;   Means for resuming the computer program upon completion of the function;   13. The system of claim 12, comprising: 14. The first programming language is a C programming language; 13. The method of claim 12, wherein the environment is a C programming environment. Item 14. The system according to Item 13. 15. A plurality of threads are created, said plurality of threads being a single queue means 13. The method according to claim 12, wherein a request from the common function is removed and a common function is shared. The system according to claim 14. 16. The function is a DCE function, and the computer program is an MV The vehicle according to any one of claims 12 to 15, wherein the vehicle travels in an S environment. The system according to paragraph.
JP8520267A 1994-12-23 1995-05-18 Method and system for calling a function from a program running in another environment Expired - Lifetime JP2982976B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
GB9426201A GB2296351A (en) 1994-12-23 1994-12-23 Calling functions from programs running in another environment
GB9426201.1 1994-12-23
PCT/GB1995/001121 WO1996020441A1 (en) 1994-12-23 1995-05-18 Method and system of calling functions from programs running in another environment

Publications (2)

Publication Number Publication Date
JPH10501083A true JPH10501083A (en) 1998-01-27
JP2982976B2 JP2982976B2 (en) 1999-11-29

Family

ID=10766575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8520267A Expired - Lifetime JP2982976B2 (en) 1994-12-23 1995-05-18 Method and system for calling a function from a program running in another environment

Country Status (4)

Country Link
EP (1) EP0799447A1 (en)
JP (1) JP2982976B2 (en)
GB (1) GB2296351A (en)
WO (1) WO1996020441A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338720A (en) * 1998-05-28 1999-12-10 Nec Software Ltd Method and equipment for controlling client-server communication and recording medium
JP2000047888A (en) * 1998-07-31 2000-02-18 Digital Vision Laboratories:Kk Computer, parallel distribution system and function calling method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2520543B2 (en) * 1991-09-06 1996-07-31 インターナショナル・ビジネス・マシーンズ・コーポレイション Method and system for managing program execution
US5497463A (en) * 1992-09-25 1996-03-05 Bull Hn Information Systems Inc. Ally mechanism for interconnecting non-distributed computing environment (DCE) and DCE systems to operate in a network system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338720A (en) * 1998-05-28 1999-12-10 Nec Software Ltd Method and equipment for controlling client-server communication and recording medium
JP2000047888A (en) * 1998-07-31 2000-02-18 Digital Vision Laboratories:Kk Computer, parallel distribution system and function calling method

Also Published As

Publication number Publication date
GB9426201D0 (en) 1995-02-22
EP0799447A1 (en) 1997-10-08
JP2982976B2 (en) 1999-11-29
GB2296351A (en) 1996-06-26
WO1996020441A1 (en) 1996-07-04

Similar Documents

Publication Publication Date Title
KR100898315B1 (en) Enhanced runtime hosting
US5666533A (en) Program execution management using process enclaves which define the scope of high-level language semantics and threads improving cooperation between processes written in multiple languages
US6848106B1 (en) Snapshot restore of application chains and applications
US6917963B1 (en) Snapshot image for the application state of unshareable and shareable data
US5835764A (en) Transaction processing system and method having a transactional subsystem integrated within a reduced kernel operating system
US6763518B2 (en) Automatic client/server translation and execution of non-native applications
EP2132640B1 (en) Abstracting operating environment from operating system
US8539499B1 (en) Symmetric multiprocessing with virtual CPU and VSMP technology
EP2296089A2 (en) Operating systems
US20070022421A1 (en) Operating systems
US7552434B2 (en) Method of performing kernel task upon initial execution of process at user level
US7546600B2 (en) Method of assigning virtual process identifier to process within process domain
Duell et al. Requirements for linux checkpoint/restart
JP2982976B2 (en) Method and system for calling a function from a program running in another environment
JP2006522971A (en) operating system
US20200401415A1 (en) Operating system architecture for microkernel generations support
CA2234796C (en) Portable object-oriented operating system
Hildebrand A microkernel POSIX OS for realtime embedded systems
Cohn et al. Basing Micro-kernel Abstractions on High-Level Language Models
Gupta et al. Operating system
Malaika et al. A tale of a transaction monitor
Wang et al. User Interface
Wyman et al. zAAPs and zIIPs: Increasing the strategic value of System z
Wickham et al. Preliminary comparison between the single-threaded and multi-threaded RHODOS microkernel
Server 5FIFTH